瀏覽代碼

Fixes #2904. v2 InvokeKeybindings called twice when running in Dialog.

BDisp 1 年之前
父節點
當前提交
15d0c04a43

+ 1 - 1
Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs

@@ -627,7 +627,7 @@ internal class CursesDriver : ConsoleDriver {
 			return true;
 		});
 
-		_mainLoop.WinChanged += ProcessInput;
+		_mainLoop.WinChanged = ProcessInput;
 	}
 
 	public override void Init (Action terminalResized)

+ 2 - 2
Terminal.Gui/ConsoleDrivers/WindowsDriver.cs

@@ -861,9 +861,9 @@ internal class WindowsDriver : ConsoleDriver {
 		_mouseHandler = mouseHandler;
 
 		_mainLoop = mainLoop.MainLoopDriver as WindowsMainLoop;
-		_mainLoop.ProcessInput += ProcessInput;
+		_mainLoop.ProcessInput = ProcessInput;
 #if HACK_CHECK_WINCHANGED
-		_mainLoop.WinChanged += ChangeWin;
+		_mainLoop.WinChanged = ChangeWin;
 #endif
 	}