mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02: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:
Notes:
sideshowbarker
2024-07-18 23:48:03 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/333366a99d0
@@ -60,7 +60,7 @@ bool decode(Decoder& decoder, Gfx::ShareableBitmap& shareable_bitmap)
|
||||
if (!decoder.decode(size))
|
||||
return false;
|
||||
|
||||
auto bitmap = Gfx::Bitmap::create_with_anon_fd(Gfx::BitmapFormat::RGBA32, anon_file.fd(), size, Gfx::Bitmap::ShouldCloseAnonymousFile::No);
|
||||
auto bitmap = Gfx::Bitmap::create_with_anon_fd(Gfx::BitmapFormat::RGBA32, anon_file.take_fd(), size, Gfx::Bitmap::ShouldCloseAnonymousFile::Yes);
|
||||
shareable_bitmap = bitmap->to_shareable_bitmap();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user