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
commit 2259ddf937
Notes: sideshowbarker 2024-07-17 08:55:54 +09:00

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));