1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-21 16:45:07 +00:00
serenity/Userland/Libraries/LibGUI/WindowManagerServerConnection.h
Spencer Dixon 4f11138e8e LibGUI+WindowServer: Add new WMEvent Super+Space
To make Assistant useful we need a way to quickly trigger it. I've
added a new specialized event coming from the window server for when a
user is holding down 'Super' and hits 'Space'.

The Taskbar will be able to listen for this event and spawn a new
instance of the Assistant if it's not already running.
2021-06-28 16:29:02 +02:00

38 lines
1.3 KiB
C++

/*
* Copyright (c) 2021, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibIPC/ServerConnection.h>
#include <WindowServer/ScreenLayout.h>
#include <WindowServer/WindowManagerClientEndpoint.h>
#include <WindowServer/WindowManagerServerEndpoint.h>
namespace GUI {
class WindowManagerServerConnection final
: public IPC::ServerConnection<WindowManagerClientEndpoint, WindowManagerServerEndpoint>
, public WindowManagerClientEndpoint {
C_OBJECT(WindowManagerServerConnection)
public:
WindowManagerServerConnection()
: IPC::ServerConnection<WindowManagerClientEndpoint, WindowManagerServerEndpoint>(*this, "/tmp/portal/wm")
{
}
static WindowManagerServerConnection& the();
private:
virtual void window_removed(i32, i32, i32) override;
virtual void window_state_changed(i32, i32, i32, i32, i32, bool, bool, bool, bool, i32, String const&, Gfx::IntRect const&, Optional<i32> const&) override;
virtual void window_icon_bitmap_changed(i32, i32, i32, Gfx::ShareableBitmap const&) override;
virtual void window_rect_changed(i32, i32, i32, Gfx::IntRect const&) override;
virtual void applet_area_size_changed(i32, Gfx::IntSize const&) override;
virtual void super_key_pressed(i32) override;
virtual void super_space_key_pressed(i32) override;
};
}