|
@@ -275,6 +275,8 @@ public class ApplicationImpl : IApplication
|
|
if (Application.MainThreadId == Thread.CurrentThread.ManagedThreadId)
|
|
if (Application.MainThreadId == Thread.CurrentThread.ManagedThreadId)
|
|
{
|
|
{
|
|
action ();
|
|
action ();
|
|
|
|
+ WakeupMainLoop ();
|
|
|
|
+
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -294,9 +296,14 @@ public class ApplicationImpl : IApplication
|
|
}
|
|
}
|
|
);
|
|
);
|
|
|
|
|
|
- // Ensure the action is executed in the main loop
|
|
|
|
- // Wakeup mainloop if it's waiting for events
|
|
|
|
- Application.MainLoop.Wakeup ();
|
|
|
|
|
|
+ WakeupMainLoop ();
|
|
|
|
+
|
|
|
|
+ void WakeupMainLoop ()
|
|
|
|
+ {
|
|
|
|
+ // Ensure the action is executed in the main loop
|
|
|
|
+ // Wakeup mainloop if it's waiting for events
|
|
|
|
+ Application.MainLoop?.Wakeup ();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/// <inheritdoc />
|
|
/// <inheritdoc />
|