1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

WindowServer+Taskbar: Send WM icon updates as Gfx::ShareableBitmap

Window icons in Taskbar were previously received in WM events with
shbuf ID's. Now that Gfx::ShareableBitmap is backed by anonymous files,
we can easily switch to using those.
This commit is contained in:
Andreas Kling 2021-01-15 23:13:24 +01:00
parent 633915e792
commit 333366a99d
9 changed files with 17 additions and 35 deletions

View file

@ -289,8 +289,9 @@ void WindowServerConnection::handle(const Messages::WindowClient::WM_WindowRectC
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.icon_buffer_id(), message.icon_size()));
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)