1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

ImageViewer: Fix crash when setting wallpaper

When trying to set the wallpaper from the menu, ImageViewer would
crash because setting the wallpaper requires the program to pledge
to the WindowManager domain. This patch adds that pledge.
This commit is contained in:
justus2510 2023-04-02 23:29:32 +02:00 committed by Andreas Kling
parent 0abd469d24
commit 2259ddf937

View file

@ -43,7 +43,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto app = TRY(GUI::Application::try_create(arguments));
Config::pledge_domain("ImageViewer");
Config::pledge_domains({ "ImageViewer", "WindowManager" });
app->set_config_domain(TRY("ImageViewer"_string));