1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:07:34 +00:00

WindowServer+Userland: Pass wallpapers as Gfx::Bitmap instead of path

The WindowServer _really_ does not need to know the filesystem path to
it's wallpaper, and allows setting arbitrary wallpapers (those outside
of `/res/wallpapers`).

The GUI::Desktop will keep track of the path to the wallpaper (if any),
and save it to config if desired (to be persisted).

This avoids the need to `unveil` paths to the wallpaper, fixing #11158
This commit is contained in:
James Puleo 2022-02-13 13:00:57 -05:00 committed by Ali Mohammad Pur
parent f538545987
commit a0e7a4b9a8
13 changed files with 61 additions and 58 deletions

View file

@ -91,7 +91,7 @@ endpoint WindowServer
popup_menu(i32 menu_id, Gfx::IntPoint screen_position) =|
dismiss_menu(i32 menu_id) =|
set_wallpaper(String path) =|
set_wallpaper(Gfx::ShareableBitmap wallpaper_bitmap) =|
set_background_color(String background_color) =|
set_wallpaper_mode(String mode) =|
@ -106,7 +106,7 @@ endpoint WindowServer
set_window_icon_bitmap(i32 window_id, Gfx::ShareableBitmap icon) =|
get_wallpaper() => (String path)
get_wallpaper() => (Gfx::ShareableBitmap wallpaper_bitmap)
set_window_cursor(i32 window_id, i32 cursor_type) =|
set_window_custom_cursor(i32 window_id, Gfx::ShareableBitmap cursor) =|