From b7547c43e1de66c399c6ffbd464239df2129c6fb Mon Sep 17 00:00:00 2001 From: Tig Date: Mon, 15 Apr 2024 17:27:06 -0600 Subject: [PATCH] If Parent isn't movable, border now cancels Highlight event --- Terminal.Gui/ConsoleDrivers/ConsoleDriver.cs | 2 ++ Terminal.Gui/View/Adornment/Border.cs | 1 + 2 files changed, 3 insertions(+) diff --git a/Terminal.Gui/ConsoleDrivers/ConsoleDriver.cs b/Terminal.Gui/ConsoleDrivers/ConsoleDriver.cs index a27441630..28ef1e82d 100644 --- a/Terminal.Gui/ConsoleDrivers/ConsoleDriver.cs +++ b/Terminal.Gui/ConsoleDrivers/ConsoleDriver.cs @@ -311,6 +311,7 @@ public abstract class ConsoleDriver /// Clears the of the driver. public void ClearContents () { + Debug.WriteLine ("ClearContents"); // TODO: This method is really "Clear Contents" now and should not be abstract (or virtual) Contents = new Cell [Rows, Cols]; //CONCURRENCY: Unsynchronized access to Clip isn't safe. @@ -346,6 +347,7 @@ public abstract class ConsoleDriver /// The Rune used to fill the rectangle public void FillRect (Rectangle rect, Rune rune = default) { + Debug.WriteLine ("FillRect"); rect = Rectangle.Intersect (rect, Clip); lock (Contents) { diff --git a/Terminal.Gui/View/Adornment/Border.cs b/Terminal.Gui/View/Adornment/Border.cs index 0c6842a2a..922fa2a19 100644 --- a/Terminal.Gui/View/Adornment/Border.cs +++ b/Terminal.Gui/View/Adornment/Border.cs @@ -204,6 +204,7 @@ public class Border : Adornment { if (!Parent.Arrangement.HasFlag (ViewArrangement.Movable)) { + e.Cancel = true; return; }