monitor-config-migration: Discard if configured mode is missing
If a configuration key matched a current system state, but no monitor mode was found (for example because of an incorrect refresh rate), discard it while logging a warning. https://bugzilla.gnome.org/show_bug.cgi?id=787668
This commit is contained in:
parent
9000eef49d
commit
43eeb009ce
@ -1208,6 +1208,13 @@ meta_finish_monitors_config_migration (MetaMonitorManager *monitor_manager,
|
||||
monitor_mode_spec = monitor_config->mode_spec;
|
||||
monitor_mode = meta_monitor_get_mode_from_spec (monitor,
|
||||
monitor_mode_spec);
|
||||
if (!monitor_mode)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"Mode not available on monitor");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
scale = meta_monitor_calculate_mode_scale (monitor, monitor_mode);
|
||||
|
||||
logical_monitor_config->scale = scale;
|
||||
|
Loading…
Reference in New Issue
Block a user