Skip to content

Commit

Permalink
LibGUI: Ignore application-global shortcuts in modal windows
Browse files Browse the repository at this point in the history
This is making me question the usefulness of application-global
shortcuts, but for now let's just prevent them from triggering while
you're looking at a modal message box..
  • Loading branch information
awesomekling committed Nov 10, 2020
1 parent ebaf205 commit 50aa726
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Libraries/LibGUI/WindowServerConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ void WindowServerConnection::handle(const Messages::WindowClient::KeyDown& messa
#endif
}

if (!action) {
// NOTE: Application-global shortcuts are ignored while a modal window is up.
if (!action && !window->is_modal()) {
action = Application::the()->action_for_key_event(*key_event);
#ifdef KEYBOARD_SHORTCUTS_DEBUG
dbg() << " > Asked application, got action: " << action;
Expand Down

0 comments on commit 50aa726

Please sign in to comment.