Browse Source

fixed window drag redraw

Charlie Kindel 5 years ago
parent
commit
95de2ca9e6
2 changed files with 5 additions and 2 deletions
  1. 1 1
      Terminal.Gui/Core/Toplevel.cs
  2. 4 1
      Terminal.Gui/Core/View.cs

+ 1 - 1
Terminal.Gui/Core/Toplevel.cs

@@ -264,7 +264,7 @@ namespace Terminal.Gui {
 			if (IsCurrentTop || this == Application.Top) {
 			if (IsCurrentTop || this == Application.Top) {
 				if (NeedDisplay != null && !NeedDisplay.IsEmpty) {
 				if (NeedDisplay != null && !NeedDisplay.IsEmpty) {
 					Driver.SetAttribute (Colors.TopLevel.Normal);
 					Driver.SetAttribute (Colors.TopLevel.Normal);
-					Clear (bounds);
+					Clear (Frame);
 					Driver.SetAttribute (Colors.Base.Normal);
 					Driver.SetAttribute (Colors.Base.Normal);
 				}
 				}
 				foreach (var view in Subviews) {
 				foreach (var view in Subviews) {

+ 4 - 1
Terminal.Gui/Core/View.cs

@@ -911,9 +911,12 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// <summary>
 		/// Redraws this view and its subviews; only redraws the views that have been flagged for a re-display.
 		/// Redraws this view and its subviews; only redraws the views that have been flagged for a re-display.
 		/// </summary>
 		/// </summary>
-		/// <param name="bounds">The view-relative region to redraw.</param>
+		/// <param name="bounds">The bounds (view-relative region) to redraw.</param>
 		/// <remarks>
 		/// <remarks>
 		/// <para>
 		/// <para>
+		///    Always use <see cref="Bounds"/> (view-relative) when calling <see cref="Redraw(Rect)"/>, NOT <see cref="Frame"/> (superview-relative).
+		/// </para>
+		/// <para>
 		///    Views should set the color that they want to use on entry, as otherwise this will inherit
 		///    Views should set the color that they want to use on entry, as otherwise this will inherit
 		///    the last color that was set globaly on the driver.
 		///    the last color that was set globaly on the driver.
 		/// </para>
 		/// </para>