Browse Source

Fixes #1772. Avoids WindowsDriver flickering when resizing. (#1778)

BDisp 3 years ago
parent
commit
aff0210900
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Terminal.Gui/ConsoleDrivers/WindowsDriver.cs

+ 6 - 0
Terminal.Gui/ConsoleDrivers/WindowsDriver.cs

@@ -1571,6 +1571,12 @@ namespace Terminal.Gui {
 			if (damageRegion.Left == -1)
 				return;
 
+			if (!HeightAsBuffer) {
+				var windowSize = WinConsole.GetConsoleBufferWindow (out _);
+				if (!windowSize.IsEmpty && (windowSize.Width != Cols || windowSize.Height != Rows))
+					return;
+			}
+
 			var bufferCoords = new WindowsConsole.Coord () {
 				X = (short)Clip.Width,
 				Y = (short)Clip.Height