Browse Source

Remove unnecessary IsSuspendRead property.

BDisp 9 months ago
parent
commit
7fa098f0ab

+ 0 - 3
Terminal.Gui/ConsoleDrivers/AnsiEscapeSequence/AnsiEscapeSequenceRequest.cs

@@ -74,8 +74,6 @@ public class AnsiEscapeSequenceRequest
                 driver.StopReportingMouseMoves ();
             }
 
-            driver!.IsSuspendRead = true;
-
             // Send the ANSI escape sequence
             ansiRequest.Response = driver.WriteAnsiRequest (ansiRequest);
 
@@ -107,7 +105,6 @@ public class AnsiEscapeSequenceRequest
 
             if (savedIsReportingMouseMoves)
             {
-                driver!.IsSuspendRead = false;
                 driver.StartReportingMouseMoves ();
             }
         }

+ 3 - 8
Terminal.Gui/ConsoleDrivers/ConsoleDriver.cs

@@ -567,11 +567,6 @@ public abstract class ConsoleDriver
     /// </summary>
     public abstract bool IsReportingMouseMoves { get; internal set; }
 
-    /// <summary>
-    /// Gets whether the terminal is reading input.
-    /// </summary>
-    public abstract bool IsSuspendRead { get; internal set; }
-
     /// <summary>Event fired when a key is pressed down. This is a precursor to <see cref="KeyUp"/>.</summary>
     public event EventHandler<Key>? KeyDown;
 
@@ -619,17 +614,17 @@ public abstract class ConsoleDriver
     public abstract void SendKeys (char keyChar, ConsoleKey key, bool shift, bool alt, bool ctrl);
 
     /// <summary>
-    /// Provide handling for the terminal start reporting mouse events.
+    ///     Provide handling for the terminal start reporting mouse events.
     /// </summary>
     public abstract void StartReportingMouseMoves ();
 
     /// <summary>
-    /// Provide handling for the terminal stop reporting mouse events.
+    ///     Provide handling for the terminal stop reporting mouse events.
     /// </summary>
     public abstract void StopReportingMouseMoves ();
 
     /// <summary>
-    /// Provide handling for the terminal write ANSI escape sequence request.
+    ///     Provide handling for the terminal write ANSI escape sequence request.
     /// </summary>
     /// <param name="ansiRequest">The <see cref="AnsiEscapeSequenceRequest"/> object.</param>
     /// <returns>The request response.</returns>

+ 0 - 7
Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs

@@ -180,13 +180,6 @@ internal class CursesDriver : ConsoleDriver
 
     public override bool IsReportingMouseMoves { get; internal set; }
 
-    /// <inheritdoc />
-    public override bool IsSuspendRead
-    {
-        get => _isSuspendRead;
-        internal set => _isSuspendRead = value;
-    }
-
     public override void StartReportingMouseMoves ()
     {
         if (!RunningUnitTests)

+ 1 - 13
Terminal.Gui/ConsoleDrivers/FakeDriver/FakeDriver.cs

@@ -41,18 +41,7 @@ public class FakeDriver : ConsoleDriver
     public override bool SupportsTrueColor => false;
 
     /// <inheritdoc />
-    public override bool IsReportingMouseMoves
-    {
-        get => _isReportingMouseMoves;
-        internal set => _isReportingMouseMoves = value;
-    }
-
-    /// <inheritdoc />
-    public override bool IsSuspendRead
-    {
-        get => _isSuspendRead;
-        internal set => _isSuspendRead = value;
-    }
+    public override bool IsReportingMouseMoves { get; internal set; }
 
     public FakeDriver ()
     {
@@ -351,7 +340,6 @@ public class FakeDriver : ConsoleDriver
     }
 
     private CursorVisibility _savedCursorVisibility;
-    private bool _isReportingMouseMoves;
     private bool _isSuspendRead;
 
     private void MockKeyPressedHandler (ConsoleKeyInfo consoleKeyInfo)

+ 0 - 7
Terminal.Gui/ConsoleDrivers/NetDriver.cs

@@ -1392,13 +1392,6 @@ internal class NetDriver : ConsoleDriver
 
     public override bool IsReportingMouseMoves { get; internal set; }
 
-    /// <inheritdoc />
-    public override bool IsSuspendRead
-    {
-        get => _isSuspendRead;
-        internal set => _isSuspendRead = value;
-    }
-
     public override void StartReportingMouseMoves ()
     {
         if (!RunningUnitTests)

+ 1 - 13
Terminal.Gui/ConsoleDrivers/WindowsDriver.cs

@@ -1052,18 +1052,7 @@ internal class WindowsDriver : ConsoleDriver
     public override bool SupportsTrueColor => RunningUnitTests || (Environment.OSVersion.Version.Build >= 14931 && _isWindowsTerminal);
 
     /// <inheritdoc />
-    public override bool IsReportingMouseMoves
-    {
-        get => _isReportingMouseMoves;
-        internal set => _isReportingMouseMoves = value;
-    }
-
-    /// <inheritdoc />
-    public override bool IsSuspendRead
-    {
-        get => _isSuspendRead;
-        internal set => _isSuspendRead = value;
-    }
+    public override bool IsReportingMouseMoves { get; internal set; }
 
     public WindowsConsole WinConsole { get; private set; }
 
@@ -1261,7 +1250,6 @@ internal class WindowsDriver : ConsoleDriver
     #region Cursor Handling
 
     private CursorVisibility? _cachedCursorVisibility;
-    private bool _isReportingMouseMoves;
     private bool _isSuspendRead;
 
     public override void UpdateCursor ()