瀏覽代碼

Code cleanpu

Tig 1 周之前
父節點
當前提交
59714dd111
共有 1 個文件被更改,包括 8 次插入7 次删除
  1. 8 7
      Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs

+ 8 - 7
Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs

@@ -137,17 +137,18 @@ public class ApplicationMainLoop<TInputRecord> : IApplicationMainLoop<TInputReco
         // Pull any input events from the input queue and process them
         InputProcessor.ProcessQueue ();
 
-        //if (App?.TopRunnableView != null)
-        {
-            SizeMonitor.Poll ();
+        // Check for any size changes; this will cause SizeChanged events
+        SizeMonitor.Poll ();
 
-            App?.LayoutAndDraw (forceRedraw: false);
+        // Layout and draw any views that need it
+        App?.LayoutAndDraw (forceRedraw: false);
 
-            SetCursor ();
-        }
+        // Update the cursor
+        SetCursor ();
 
-        var swCallbacks = Stopwatch.StartNew ();
+        Stopwatch swCallbacks = Stopwatch.StartNew ();
 
+        // Run any timeout callbacks that are due
         TimedEvents.RunTimers ();
 
         Logging.IterationInvokesAndTimeouts.Record (swCallbacks.Elapsed.Milliseconds);