diff options
Diffstat (limited to 'Userland/Services/WindowServer')
-rw-r--r-- | Userland/Services/WindowServer/WindowManager.cpp | 16 | ||||
-rw-r--r-- | Userland/Services/WindowServer/WindowManager.h | 1 | ||||
-rw-r--r-- | Userland/Services/WindowServer/WindowManagerClient.ipc | 1 |
3 files changed, 18 insertions, 0 deletions
diff --git a/Userland/Services/WindowServer/WindowManager.cpp b/Userland/Services/WindowServer/WindowManager.cpp index 5be6385478..1229672f86 100644 --- a/Userland/Services/WindowServer/WindowManager.cpp +++ b/Userland/Services/WindowServer/WindowManager.cpp @@ -376,6 +376,17 @@ void WindowManager::tell_wms_super_key_pressed() }); } +void WindowManager::tell_wms_super_space_key_pressed() +{ + for_each_window_manager([](WMClientConnection& conn) { + if (conn.window_id() < 0) + return IterationDecision::Continue; + + conn.async_super_space_key_pressed(conn.window_id()); + return IterationDecision::Continue; + }); +} + static bool window_type_has_title(WindowType type) { return type == WindowType::Normal || type == WindowType::ToolWindow; @@ -1247,6 +1258,11 @@ void WindowManager::process_key_event(KeyEvent& event) tell_wms_super_key_pressed(); return; } + + if (event.type() == Event::KeyDown && event.key() == Key_Space) { + tell_wms_super_space_key_pressed(); + return; + } } if (MenuManager::the().current_menu() && event.key() != Key_Super) { diff --git a/Userland/Services/WindowServer/WindowManager.h b/Userland/Services/WindowServer/WindowManager.h index b3f21dd71a..3dfa0b6ab6 100644 --- a/Userland/Services/WindowServer/WindowManager.h +++ b/Userland/Services/WindowServer/WindowManager.h @@ -156,6 +156,7 @@ public: void tell_wms_window_rect_changed(Window&); void tell_wms_applet_area_size_changed(Gfx::IntSize const&); void tell_wms_super_key_pressed(); + void tell_wms_super_space_key_pressed(); bool is_active_window_or_accessory(Window&) const; diff --git a/Userland/Services/WindowServer/WindowManagerClient.ipc b/Userland/Services/WindowServer/WindowManagerClient.ipc index b56aa24ca2..bd7317c6f1 100644 --- a/Userland/Services/WindowServer/WindowManagerClient.ipc +++ b/Userland/Services/WindowServer/WindowManagerClient.ipc @@ -6,4 +6,5 @@ endpoint WindowManagerClient window_rect_changed(i32 wm_id, i32 client_id, i32 window_id, Gfx::IntRect rect) =| applet_area_size_changed(i32 wm_id, Gfx::IntSize size) =| super_key_pressed(i32 wm_id) =| + super_space_key_pressed(i32 wm_id) =| } |