mirror of
https://github.com/RGBCube/serenity
synced 2025-06-21 17:52:06 +00:00
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
This commit is contained in:
parent
d86b20d8bd
commit
6b52f6c61d
1 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue