Skip to content

Commit

Permalink
Fixes #2904. v2 InvokeKeybindings called twice when running in Dialog.
Browse files Browse the repository at this point in the history
  • Loading branch information
BDisp authored and tig committed Oct 17, 2023
1 parent 5889439 commit 15d0c04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ public override void PrepareToRun (MainLoop mainLoop, Action<KeyEvent> keyHandle
return true;
});

_mainLoop.WinChanged += ProcessInput;
_mainLoop.WinChanged = ProcessInput;
}

public override void Init (Action terminalResized)
Expand Down
4 changes: 2 additions & 2 deletions Terminal.Gui/ConsoleDrivers/WindowsDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -861,9 +861,9 @@ public override void PrepareToRun (MainLoop mainLoop, Action<KeyEvent> 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
}

Expand Down

0 comments on commit 15d0c04

Please sign in to comment.