mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 07:47:54 +01:00
Merge branch 'gui-cs:v2_develop' into v2_develop
This commit is contained in:
@@ -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 />
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user