1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:27:43 +00:00

LibGUI+WindowServer: Add WM_SuperKeyPressed event

This commit adds an event called WM_SuperKeyPressed which is sent to all
windows via WindowManagerServerConnection.
The event is fired from WindowManager when the super key is pressed,
which is the windows key on most keyboards :)
This commit is contained in:
Conor Byrne 2021-04-17 23:21:24 +01:00 committed by Andreas Kling
parent ec3596545a
commit 88ecfa164a
6 changed files with 45 additions and 1 deletions

View file

@ -175,6 +175,7 @@ public:
void tell_wms_window_icon_changed(Window&);
void tell_wms_window_rect_changed(Window&);
void tell_wms_applet_area_size_changed(const Gfx::IntSize&);
void tell_wms_super_key_pressed();
bool is_active_window_or_accessory(Window&) const;
@ -334,6 +335,7 @@ private:
DoubleClickInfo m_double_click_info;
int m_double_click_speed { 0 };
int m_max_distance_for_double_click { 4 };
bool m_previous_event_was_super_keydown { false };
WeakPtr<Window> m_active_window;
WeakPtr<Window> m_hovered_window;