1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:07:36 +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

@ -82,6 +82,7 @@ public:
WM_WindowRectChanged,
WM_WindowIconBitmapChanged,
WM_AppletAreaSizeChanged,
WM_SuperKeyPressed,
__End_WM_Events,
};
@ -113,6 +114,14 @@ private:
int m_window_id { -1 };
};
class WMSuperKeyPressedEvent : public WMEvent {
public:
explicit WMSuperKeyPressedEvent(int client_id)
: WMEvent(Event::Type::WM_SuperKeyPressed, client_id, 0)
{
}
};
class WMAppletAreaSizeChangedEvent : public WMEvent {
public:
explicit WMAppletAreaSizeChangedEvent(const Gfx::IntSize& size)