DisplaySettings: Pass the parent window to the FilePicker

Prior this change, closing the Display Settings application
didn't close the File Picker.
This commit is contained in:
Karol Kosek 2021-08-07 23:07:08 +02:00 committed by Andreas Kling
commit e8fad5614e
Notes: sideshowbarker 2024-07-19 17:19:17 +09:00

View file

@ -61,7 +61,7 @@ void BackgroundSettingsWidget::create_frame()
auto& button = *find_descendant_of_type_named<GUI::Button>("wallpaper_open_button");
button.on_click = [this](auto) {
auto path = GUI::FilePicker::get_open_filepath(nullptr, "Select wallpaper from file system", "/res/wallpapers");
auto path = GUI::FilePicker::get_open_filepath(window(), "Select wallpaper from file system", "/res/wallpapers");
if (!path.has_value())
return;
m_wallpaper_view->selection().clear();