2
0
Эх сурвалжийг харах

Enable Driver.Suspend for NetDriver using Unix.

BDisp 1 жил өмнө
parent
commit
1e7263be73

+ 17 - 3
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 ()
     {