Merge branch 'gui-cs:v2_develop' into v2_develop

This commit is contained in:
Tig
2025-07-24 07:14:43 -06:00
committed by GitHub
3 changed files with 14 additions and 1 deletions

View File

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

View File

@@ -807,7 +807,7 @@ public partial class View // Drawing APIs
}
// There was multiple enumeration error here, so calling ToArray - probably a stop gap
foreach (View subview in SubViews.ToArray ())
foreach (View subview in InternalSubViews)
{
if (subview.Frame.IntersectsWith (viewPortRelativeRegion))
{

View File

@@ -11,6 +11,8 @@ public class SpinnerViewTests (ITestOutputHelper output)
[InlineData (false)]
public void TestSpinnerView_AutoSpin (bool callStop)
{
ConsoleDriver.RunningUnitTests = true;
SpinnerView view = GetSpinnerView ();
Assert.Empty (Application.MainLoop.TimedEvents.Timeouts);