From 15d0c04a43766b1cc8812dc133ccf8851deb185f Mon Sep 17 00:00:00 2001 From: BDisp Date: Sun, 15 Oct 2023 19:08:19 +0100 Subject: [PATCH] Fixes #2904. v2 InvokeKeybindings called twice when running in Dialog. --- Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs | 2 +- Terminal.Gui/ConsoleDrivers/WindowsDriver.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs b/Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs index b5fd61084c..f7563327ca 100644 --- a/Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs +++ b/Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs @@ -627,7 +627,7 @@ public override void PrepareToRun (MainLoop mainLoop, Action keyHandle return true; }); - _mainLoop.WinChanged += ProcessInput; + _mainLoop.WinChanged = ProcessInput; } public override void Init (Action terminalResized) diff --git a/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs b/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs index 8918875639..18e6492b9f 100644 --- a/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs +++ b/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs @@ -861,9 +861,9 @@ public override void PrepareToRun (MainLoop mainLoop, Action keyHandle _mouseHandler = mouseHandler; _mainLoop = mainLoop.MainLoopDriver as WindowsMainLoop; - _mainLoop.ProcessInput += ProcessInput; + _mainLoop.ProcessInput = ProcessInput; #if HACK_CHECK_WINCHANGED - _mainLoop.WinChanged += ChangeWin; + _mainLoop.WinChanged = ChangeWin; #endif }