summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-11-10 19:40:40 +0100
committerAndreas Kling <kling@serenityos.org>2020-11-10 19:41:03 +0100
commit50aa726db72cdb27a084fc1b8dd3de7fe168ef0d (patch)
tree92eb43d858448de151ee4da0221864329d9ee2f6 /Libraries
parentebaf20547c5108adba1d7fd0ecddea3086a239f2 (diff)
downloadserenity-50aa726db72cdb27a084fc1b8dd3de7fe168ef0d.zip
LibGUI: Ignore application-global shortcuts in modal windows
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..
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibGUI/WindowServerConnection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Libraries/LibGUI/WindowServerConnection.cpp b/Libraries/LibGUI/WindowServerConnection.cpp
index 4a5eb28f2e..b1bb2703c4 100644
--- a/Libraries/LibGUI/WindowServerConnection.cpp
+++ b/Libraries/LibGUI/WindowServerConnection.cpp
@@ -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;