mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
WindowServer: Use Gfx::ShareableBitmap for SetWindowIconBitmap
This commit is contained in:
parent
7cfe712f4d
commit
8c5fa05c39
3 changed files with 5 additions and 7 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue