-
-
Notifications
You must be signed in to change notification settings - Fork 442
Dependency Injection Rewrite #2352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
OpenTabletDriver.Desktop/Interop/DesktopMacOSServiceCollection.cs
Outdated
Show resolved
Hide resolved
OpenTabletDriver.Configurations/Parsers/Wacom/Wacom64bAuxReportParser.cs
Outdated
Show resolved
Hide resolved
72c5543 to
9b5f26d
Compare
Co-authored-by: X9VoiD <oscar.silvestrexx@gmail.com>
OutputMode: Fix 'Area Clipping' not discarding output correctly
|
Linux lg2m and tested working well enough that a prerelease is viable. Still needs testing on other platforms. Btw, you can add "Fixes #1988" now |
AkiSakurai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor issues collected, it is cumbersome to recreate separated issues, I just leave the comments here.
| await Driver.Instance.ResetSettings(); | ||
| App.Current.Settings = await Driver.Instance.GetSettings(); | ||
| if (await _rpc.Instance!.GetUpdateInfo() is UpdateInfo updateInfo) | ||
| _app.ShowWindow<UpdateForm>(updateInfo); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unhandled exception. MonoMac.Foundation.ObjCException: NSInternalInconsistencyException: NSWindow drag regions should only be invalidated on the Main Thread!
at MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_CGRect_UInt64_UInt64_bool(IntPtr receiver, IntPtr selector, CGRect arg1, UInt64 arg2, UInt64 arg3, Boolean arg4)
at MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_CGRect_UInt64_UInt64_bool(IntPtr receiver, IntPtr selector, CGRect arg1, UInt64 arg2, UInt64 arg3, Boolean arg4)
at MonoMac.AppKit.NSWindow..ctor(CGRect contentRect, NSWindowStyle aStyle, NSBackingStore bufferingType, Boolean deferCreation)
at Eto.Mac.Forms.EtoWindow..ctor(CGRect rect, NSWindowStyle style, NSBackingStore store, Boolean flag)
at Eto.Mac.Forms.FormHandler.CreateControl()
at Eto.WidgetHandler`2.get_Control()
at Eto.Mac.Forms.MacWindow`3.ConfigureWindow()
at Eto.Mac.Forms.FormHandler`1.Initialize()
at Eto.WidgetHandler`1.Eto.Widget.IHandler.Initialize()
at Eto.Widget.Initialize()
at Eto.Forms.Window..ctor()
at Eto.Forms.Form..ctor()
at OpenTabletDriver.UX.Components.DesktopForm..ctor()
at OpenTabletDriver.UX.Windows.UpdateForm..ctor(IDriverDaemon daemon, App app, UpdateInfo update)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at OpenTabletDriver.Desktop.DependencyInjectionExtensions.CreateInstance(IServiceProvider serviceProvider, Type type, Object[] additionalDependencies)
at OpenTabletDriver.Desktop.DependencyInjectionExtensions.CreateInstance[T](IServiceProvider serviceProvider, Object[] additionalDependencies)
at OpenTabletDriver.Desktop.DependencyInjectionExtensions.GetOrCreateInstance[T](IServiceProvider serviceProvider, Object[] additionalDependencies)
at OpenTabletDriver.UX.App.ShowWindow[TWindow](Object[] deps)
at OpenTabletDriver.UX.MainForm.OnConnected()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetExistingTaskResult(Task`1 task, TResult result)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetResult(TResult result)
at StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](RequestId id, String targetName, IReadOnlyList`1 arguments, IReadOnlyList`1 positionalArgumentDeclaredTypes, IReadOnlyDictionary`2 namedArgumentDeclaredTypes, CancellationToken cancellationToken, Boolean isParameterObject)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetExistingTaskResult(Task`1 task, TResult result)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetResult(TResult result)
at StreamJsonRpc.JsonRpc.InvokeCoreAsync(JsonRpcRequest request, Type expectedResultType, CancellationToken cancellationToken)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
at System.Threading.Tasks.TaskCompletionSource`1.SetResult(TResult result)
at StreamJsonRpc.JsonRpc.<>c__DisplayClass143_0.<InvokeCoreAsync>b__0(JsonRpcMessage response)
at StreamJsonRpc.JsonRpc.HandleRpcAsync(JsonRpcMessage rpc)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
at Microsoft.VisualStudio.Threading.AwaitExtensions.TaskSchedulerAwaiter.<>c.<UnsafeOnCompleted>b__6_0(Object state)
at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
| if (MessageBox.Show("Reset settings to default?", "Reset to defaults", MessageBoxButtons.OKCancel, MessageBoxType.Question) == DialogResult.Ok) | ||
| await ResetSettings(); | ||
| } | ||
| Content = _placeholder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.
at System.Windows.Threading.Dispatcher.VerifyAccess()
at Eto.Wpf.Forms.TableLayoutHandler.InitializeSizes()
at Eto.Wpf.Forms.TableLayoutHandler.SetupGrid()
at Eto.Wpf.Forms.TableLayoutHandler.OnLoad(EventArgs e)
at Eto.Forms.Control.OnLoad(EventArgs e)
at Eto.Forms.TableLayout.OnLoad(EventArgs e)
at Eto.Forms.Control.TriggerLoad(EventArgs e)
at Eto.Forms.Container.OnLoad(EventArgs e)
at Eto.Forms.TableLayout.OnLoad(EventArgs e)
at Eto.Forms.Control.TriggerLoad(EventArgs e)
at Eto.Forms.Container.OnLoad(EventArgs e)
at Eto.Forms.StackLayout.OnLoad(EventArgs e)
at Eto.Forms.Control.TriggerLoad(EventArgs e)
at Eto.Forms.Container.OnLoad(EventArgs e)
at Eto.Forms.Control.TriggerLoad(EventArgs e)
at Eto.Forms.Container.SetParent(Control child, Action assign, Control previousChild)
at Eto.Forms.Panel.set_Content(Control value)
at OpenTabletDriver.UX.MainForm.OnDisconnected() in
| private async Task InstallUpdate() | ||
| { | ||
| Enabled = false; | ||
| var executable = Process.GetCurrentProcess().ProcessName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Process name is truncated on macos.
dotnet/runtime#52860
|
|
||
| LogMessage IList<LogMessage>.this[int index] | ||
| { | ||
| get => (_filteredMessages as IList<LogMessage>)![index]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eto (>=2.6.0) added caching for non indexable IEnumerable lookup but forgot to invalidate the cache when IEnumerable is updated. Which brokes the log viewer and causes random segfault.
picoe/Eto#2029
Queue<T> does not implement IList<T>.
Beside, this function is not called by Eto.
Eto calls IList<object>.[] or IList.[] internally, but IList<T> can't be cast to IList<object>.
As a workaround, you can avoid the caching by implement IList or just use FilterCollection so the index function can be picked up by eto.
| }; | ||
|
|
||
| IAreaConverter? converter = null; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Process.Start("chmod", $"+x {subPath}/OpenTabletDriver.UX.MacOS"); | ||
| Process.Start("chmod", $"+x {subPath}/OpenTabletDriver.Daemon"); | ||
| Move(subPath, BinaryDirectory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DownloadDirectory is moved to BinaryDirectory by function Install in superclass before this function is called.
| var splitter = new Splitter | ||
| { | ||
| Panel1MinimumSize = 250, | ||
| Panel1 = _configsList = new ListBox<TabletConfiguration>(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Configuration editor is not scrollable now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird that the macOS implementation doesn't have a scrollable built into that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.


Notes
Issues