mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Fixes #4196. Application.Begin doesn't refresh the screen at start
This commit is contained in:
@@ -212,8 +212,15 @@ public static partial class Application // Run (Begin, Run, End, Stop)
|
||||
|
||||
NotifyNewRunState?.Invoke (toplevel, new (rs));
|
||||
|
||||
// Force an Idle event so that an Iteration (and Refresh) happen.
|
||||
Invoke (() => { });
|
||||
if (!ConsoleDriver.RunningUnitTests)
|
||||
{
|
||||
// Force an Idle event so that an Iteration (and Refresh) happen.
|
||||
Task.Run (() =>
|
||||
{
|
||||
Invoke (() => { });
|
||||
Task.Delay (10).Wait ();
|
||||
});
|
||||
}
|
||||
|
||||
return rs;
|
||||
}
|
||||
|
||||
@@ -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