summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/WindowServerConnection.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-05-12 20:58:09 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-12 20:59:07 +0200
commitbc0146932eff7346b8450cd764849a6bb90786e6 (patch)
treee5f961b4fa3314b234cebf6b3491c1eedcddbcc5 /Userland/Libraries/LibGUI/WindowServerConnection.cpp
parent8c7bce818d7c394f14c19d1efd20ba998fc34232 (diff)
downloadserenity-bc0146932eff7346b8450cd764849a6bb90786e6.zip
LibGUI: Never resolve Key_Invalid to a GUI::Action
Fixes #7047.
Diffstat (limited to 'Userland/Libraries/LibGUI/WindowServerConnection.cpp')
-rw-r--r--Userland/Libraries/LibGUI/WindowServerConnection.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/WindowServerConnection.cpp b/Userland/Libraries/LibGUI/WindowServerConnection.cpp
index 4cf36d658c..492ea7c421 100644
--- a/Userland/Libraries/LibGUI/WindowServerConnection.cpp
+++ b/Userland/Libraries/LibGUI/WindowServerConnection.cpp
@@ -113,6 +113,9 @@ void WindowServerConnection::window_left(i32 window_id)
static Action* action_for_key_event(Window& window, KeyEvent const& event)
{
+ if (event.key() == KeyCode::Key_Invalid)
+ return nullptr;
+
dbgln_if(KEYBOARD_SHORTCUTS_DEBUG, "Looking up action for {}", event.to_string());
for (auto* widget = window.focused_widget(); widget; widget = widget->parent_widget()) {