From 1e7263be73a7141d9614c585ff30e6d6e13a58a8 Mon Sep 17 00:00:00 2001 From: BDisp Date: Thu, 30 May 2024 13:37:18 +0100 Subject: [PATCH] Enable Driver.Suspend for NetDriver using Unix. --- Terminal.Gui/ConsoleDrivers/NetDriver.cs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Terminal.Gui/ConsoleDrivers/NetDriver.cs b/Terminal.Gui/ConsoleDrivers/NetDriver.cs index f7f6df8b0..ee1bafe2a 100644 --- a/Terminal.Gui/ConsoleDrivers/NetDriver.cs +++ b/Terminal.Gui/ConsoleDrivers/NetDriver.cs @@ -852,11 +852,25 @@ internal class NetDriver : ConsoleDriver { } } - #region Not Implemented + public override void Suspend () + { + if (Environment.OSVersion.Platform != PlatformID.Unix) + { + return; + } - public override void Suspend () { throw new NotImplementedException (); } + StopReportingMouseMoves (); - #endregion + if (!RunningUnitTests) + { + Console.ResetColor (); + Console.Clear (); + Platform.Suspend (); + Application.Refresh (); + } + + StartReportingMouseMoves (); + } public override void UpdateScreen () {