summaryrefslogtreecommitdiff
path: root/Servers
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-03-29 19:10:19 +0200
committerAndreas Kling <kling@serenityos.org>2020-03-29 19:37:23 +0200
commit8c5fa05c39c65b685e885b5c850ddd8e1d4bd442 (patch)
tree3945bdabeb01a5e7f2e633e9c2d93d3d84923c02 /Servers
parent7cfe712f4d0298cb645a602afe116698ab0fcd67 (diff)
downloadserenity-8c5fa05c39c65b685e885b5c850ddd8e1d4bd442.zip
WindowServer: Use Gfx::ShareableBitmap for SetWindowIconBitmap
Diffstat (limited to 'Servers')
-rw-r--r--Servers/WindowServer/ClientConnection.cpp8
-rw-r--r--Servers/WindowServer/WindowServer.ipc2
2 files changed, 4 insertions, 6 deletions
diff --git a/Servers/WindowServer/ClientConnection.cpp b/Servers/WindowServer/ClientConnection.cpp
index 5065d2dead..4b0449d771 100644
--- a/Servers/WindowServer/ClientConnection.cpp
+++ b/Servers/WindowServer/ClientConnection.cpp
@@ -361,12 +361,10 @@ OwnPtr<Messages::WindowServer::SetWindowIconBitmapResponse> ClientConnection::ha
}
auto& window = *(*it).value;
- auto icon_buffer = SharedBuffer::create_from_shbuf_id(message.icon_buffer_id());
-
- if (!icon_buffer) {
- window.set_default_icon();
+ if (message.icon().is_valid()) {
+ window.set_icon(*message.icon().bitmap());
} else {
- window.set_icon(Gfx::Bitmap::create_with_shared_buffer(Gfx::BitmapFormat::RGBA32, *icon_buffer, message.icon_size()));
+ window.set_default_icon();
}
window.frame().invalidate_title_bar();
diff --git a/Servers/WindowServer/WindowServer.ipc b/Servers/WindowServer/WindowServer.ipc
index 99796c4241..a163615ef8 100644
--- a/Servers/WindowServer/WindowServer.ipc
+++ b/Servers/WindowServer/WindowServer.ipc
@@ -79,7 +79,7 @@ endpoint WindowServer = 2
SetWallpaperMode(String mode) => ()
SetResolution(Gfx::Size resolution) => (bool success, Gfx::Size resolution)
- SetWindowIconBitmap(i32 window_id, i32 icon_buffer_id, Gfx::Size icon_size) => ()
+ SetWindowIconBitmap(i32 window_id, Gfx::ShareableBitmap icon) => ()
GetWallpaper() => (String path)
SetWindowOverrideCursor(i32 window_id, i32 cursor_type) => ()