diff options
author | Conor Byrne <71222289+dreamhopping@users.noreply.github.com> | 2021-04-17 23:21:24 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-19 20:03:25 +0200 |
commit | 88ecfa164a7bb07dccc0e4ccbe11ed66f4d7fa67 (patch) | |
tree | 91d531b43df7d1847dfa2c70dfbfb522916399bd /Userland/Libraries/LibGUI/WindowManagerServerConnection.cpp | |
parent | ec3596545abd68dc94324ce6f30ba05051c595d5 (diff) | |
download | serenity-88ecfa164a7bb07dccc0e4ccbe11ed66f4d7fa67.zip |
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 :)
Diffstat (limited to 'Userland/Libraries/LibGUI/WindowManagerServerConnection.cpp')
-rw-r--r-- | Userland/Libraries/LibGUI/WindowManagerServerConnection.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/WindowManagerServerConnection.cpp b/Userland/Libraries/LibGUI/WindowManagerServerConnection.cpp index 3e878ec477..c7cab033ec 100644 --- a/Userland/Libraries/LibGUI/WindowManagerServerConnection.cpp +++ b/Userland/Libraries/LibGUI/WindowManagerServerConnection.cpp @@ -74,4 +74,10 @@ void WindowManagerServerConnection::handle(const Messages::WindowManagerClient:: if (auto* window = Window::from_window_id(message.wm_id())) Core::EventLoop::current().post_event(*window, make<WMWindowRemovedEvent>(message.client_id(), message.window_id())); } + +void WindowManagerServerConnection::handle(const Messages::WindowManagerClient::SuperKeyPressed& message) +{ + if (auto* window = Window::from_window_id(message.wm_id())) + Core::EventLoop::current().post_event(*window, make<WMSuperKeyPressedEvent>(message.wm_id())); +} } |