diff --git a/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp b/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp index 2c644772ba..8e96fa8725 100644 --- a/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp +++ b/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -139,11 +140,12 @@ void BackgroundSettingsWidget::load_current_settings() void BackgroundSettingsWidget::apply_settings() { - Config::write_string("WindowManager", "Background", "Wallpaper", m_monitor_widget->wallpaper()); + if (GUI::Desktop::the().set_wallpaper(m_monitor_widget->wallpaper())) + Config::write_string("WindowManager", "Background", "Wallpaper", m_monitor_widget->wallpaper()); + else + GUI::MessageBox::show_error(window(), String::formatted("Unable to load file {} as wallpaper", m_monitor_widget->wallpaper())); - GUI::Desktop::the().set_wallpaper(m_monitor_widget->wallpaper()); GUI::Desktop::the().set_background_color(m_color_input->text()); - GUI::Desktop::the().set_wallpaper_mode(m_monitor_widget->wallpaper_mode()); }