summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/WindowManagerServerConnection.cpp
diff options
context:
space:
mode:
authorConor Byrne <71222289+dreamhopping@users.noreply.github.com>2021-04-17 23:21:24 +0100
committerAndreas Kling <kling@serenityos.org>2021-04-19 20:03:25 +0200
commit88ecfa164a7bb07dccc0e4ccbe11ed66f4d7fa67 (patch)
tree91d531b43df7d1847dfa2c70dfbfb522916399bd /Userland/Libraries/LibGUI/WindowManagerServerConnection.cpp
parentec3596545abd68dc94324ce6f30ba05051c595d5 (diff)
downloadserenity-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.cpp6
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()));
+}
}