summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShannon Booth <shannon.ml.booth@gmail.com>2020-01-18 12:13:55 +1300
committerAndreas Kling <awesomekling@gmail.com>2020-01-18 00:27:39 +0100
commit6b52f6c61db3b81f44c83be55aeddaccbd580ee8 (patch)
treeb8e051100575e287e2e985ffa80d8f132c0d7dd3
parentd86b20d8bd5a845acd2a2588e862a7c2778d7086 (diff)
downloadserenity-6b52f6c61db3b81f44c83be55aeddaccbd580ee8.zip
WindowServer: Fix windowswitcher not closing, make system menu a toggle
We were swallowing the keyevent on a Logo key down even if we were not opening the logo. This is incorrect, and was preventing the windowswitcher from closing. We also make the logo button toggle the system menu, as this behaviour is closer to how you would normally expect this button to work. Closes #1090
-rw-r--r--Servers/WindowServer/WSWindowManager.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Servers/WindowServer/WSWindowManager.cpp b/Servers/WindowServer/WSWindowManager.cpp
index 4584521a18..829ff8d657 100644
--- a/Servers/WindowServer/WSWindowManager.cpp
+++ b/Servers/WindowServer/WSWindowManager.cpp
@@ -944,9 +944,11 @@ void WSWindowManager::event(CEvent& event)
if (key_event.key() == Key_Logo) {
if (key_event.type() == WSEvent::KeyUp) {
- if (!m_moved_or_resized_since_logo_keydown && !m_switcher.is_visible() && !m_move_window && !m_resize_window)
- WSMenuManager::the().open_menu(WSMenuManager::the().system_menu());
- return;
+ if (!m_moved_or_resized_since_logo_keydown && !m_switcher.is_visible() && !m_move_window && !m_resize_window) {
+ WSMenuManager::the().toggle_menu(WSMenuManager::the().system_menu());
+ return;
+ }
+
} else if (key_event.type() == WSEvent::KeyDown) {
m_moved_or_resized_since_logo_keydown = false;
}