mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 09:37:41 +00:00
DisplaySettings: Show revert dialog only for resolution/dpi changes.
This commit is contained in:
parent
a4d4571522
commit
4f80bb6ce3
1 changed files with 22 additions and 20 deletions
|
@ -283,6 +283,7 @@ void DisplaySettingsWidget::send_settings_to_window_server()
|
|||
current_scale_factor = 1;
|
||||
}
|
||||
|
||||
if (current_resolution != m_monitor_widget->desktop_resolution() || current_scale_factor != m_monitor_widget->desktop_scale_factor()) {
|
||||
auto result = GUI::WindowServerConnection::the().send_sync<Messages::WindowServer::SetResolution>(m_monitor_widget->desktop_resolution(), m_monitor_widget->desktop_scale_factor());
|
||||
if (!result->success()) {
|
||||
GUI::MessageBox::show(nullptr, String::formatted("Reverting to resolution {}x{} @ {}x", result->resolution().width(), result->resolution().height(), result->scale_factor()),
|
||||
|
@ -308,6 +309,7 @@ void DisplaySettingsWidget::send_settings_to_window_server()
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_monitor_widget->wallpaper().is_empty()) {
|
||||
GUI::Desktop::the().set_wallpaper(m_monitor_widget->wallpaper());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue