瀏覽代碼

removes force redraw on sizemonitor.poll changes; not needed.

Tig 1 周之前
父節點
當前提交
77e4d7749c
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 3 3
      Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs
  2. 1 1
      Terminal.Gui/Drivers/ISizeMonitor.cs

+ 3 - 3
Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs

@@ -143,13 +143,13 @@ public class ApplicationMainLoop<TInputRecord> : IApplicationMainLoop<TInputReco
                                      || AnySubViewsNeedDrawn (App?.TopRunnableView)
                                      || (App?.Mouse.MouseGrabView != null && AnySubViewsNeedDrawn (App?.Mouse.MouseGrabView));
 
-            bool sizeChanged = SizeMonitor.Poll ();
+            SizeMonitor.Poll ();
 
-            if (needsDrawOrLayout || sizeChanged)
+            if (needsDrawOrLayout)
             {
                 Logging.Redraws.Add (1);
 
-                App?.LayoutAndDraw (true);
+                App?.LayoutAndDraw (forceRedraw: false);
 
                 Output.Write (OutputBuffer);
             }

+ 1 - 1
Terminal.Gui/Drivers/ISizeMonitor.cs

@@ -14,6 +14,6 @@ public interface ISizeMonitor
     ///     Examines the current size of the terminal and raises <see cref="SizeChanged"/> if it is different
     ///     from last inspection.
     /// </summary>
-    /// <returns></returns>
+    /// <returns><see langword="true"/> if the size has changed; otherwise, <see langword="false"/>.</returns>
     bool Poll ();
 }