mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
LibGUI+WindowServer: Separate window manager IPC from regular IPC
With this patch the window manager related functionality is split out onto a new endpoint pair named WindowManagerServer/Client. This allows window manager functionality to be potentially privilege separated in the future. To this end, a new client named WMConnectionClient is used to maintain a window manager connection. When a process connects to the endpoint and greets the WindowServer as a window manager (via Window::make_window_manager(int)), they're subscribed to the events they requested via the WM event mask. This patch also removes the hardcoding of the Taskbar WindowType to receive WM events automatically. However, being a window manager still requires having an active window, at the moment.
This commit is contained in:
parent
139c04a6e5
commit
aa56f9a1e0
24 changed files with 522 additions and 230 deletions
|
@ -273,37 +273,6 @@ void WindowServerConnection::handle(const Messages::WindowClient::MenuItemActiva
|
|||
action->activate(menu);
|
||||
}
|
||||
|
||||
void WindowServerConnection::handle(const Messages::WindowClient::WM_WindowStateChanged& message)
|
||||
{
|
||||
if (auto* window = Window::from_window_id(message.wm_id()))
|
||||
Core::EventLoop::current().post_event(*window, make<WMWindowStateChangedEvent>(message.client_id(), message.window_id(), message.parent_client_id(), message.parent_window_id(), message.title(), message.rect(), message.is_active(), message.is_modal(), static_cast<WindowType>(message.window_type()), message.is_minimized(), message.is_frameless(), message.progress()));
|
||||
}
|
||||
|
||||
void WindowServerConnection::handle(const Messages::WindowClient::WM_AppletAreaSizeChanged& message)
|
||||
{
|
||||
if (auto* window = Window::from_window_id(message.wm_id()))
|
||||
Core::EventLoop::current().post_event(*window, make<WMAppletAreaSizeChangedEvent>(message.size()));
|
||||
}
|
||||
|
||||
void WindowServerConnection::handle(const Messages::WindowClient::WM_WindowRectChanged& message)
|
||||
{
|
||||
if (auto* window = Window::from_window_id(message.wm_id()))
|
||||
Core::EventLoop::current().post_event(*window, make<WMWindowRectChangedEvent>(message.client_id(), message.window_id(), message.rect()));
|
||||
}
|
||||
|
||||
void WindowServerConnection::handle(const Messages::WindowClient::WM_WindowIconBitmapChanged& message)
|
||||
{
|
||||
if (auto* window = Window::from_window_id(message.wm_id())) {
|
||||
Core::EventLoop::current().post_event(*window, make<WMWindowIconBitmapChangedEvent>(message.client_id(), message.window_id(), message.bitmap().bitmap()));
|
||||
}
|
||||
}
|
||||
|
||||
void WindowServerConnection::handle(const Messages::WindowClient::WM_WindowRemoved& message)
|
||||
{
|
||||
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 WindowServerConnection::handle(const Messages::WindowClient::ScreenRectChanged& message)
|
||||
{
|
||||
Desktop::the().did_receive_screen_rect({}, message.rect());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue