Skip to content

Commit

Permalink
Merge pull request elfmz#2437 from unxed/numfix
Browse files Browse the repository at this point in the history
wxGetKeyState() fails to return correct Alt state under X11 in some cases
  • Loading branch information
elfmz authored Oct 20, 2024
2 parents a464fb8 + 9156f38 commit df4feaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WinPort/src/Backend/WX/wxMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,7 @@ void WinPortPanel::OnKeyDown( wxKeyEvent& event )
// also it didnt cause problems yet
if ( (_key_tracker.Shift() && !event.ShiftDown())
|| ((_key_tracker.LeftControl() || _key_tracker.RightControl()) && !event.ControlDown())) {
if (_key_tracker.CheckForSuddenModifiersUp()) {
if ((!_key_tracker.Alt() || g_wayland) && _key_tracker.CheckForSuddenModifiersUp()) {
_exclusive_hotkeys.Reset();
}
}
Expand Down Expand Up @@ -1438,7 +1438,7 @@ void WinPortPanel::OnKeyUp( wxKeyEvent& event )
#endif
wxConsoleInputShim::Enqueue(&ir, 1);
}
if (_key_tracker.CheckForSuddenModifiersUp()) {
if ((!_key_tracker.Alt() || g_wayland) && _key_tracker.CheckForSuddenModifiersUp()) {
_exclusive_hotkeys.Reset();
}
//event.Skip();
Expand Down

0 comments on commit df4feaf

Please sign in to comment.