[mutter] monitor-config-migration: Discard if configured mode is missing
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] monitor-config-migration: Discard if configured mode is missing
- Date: Wed, 4 Oct 2017 13:49:10 +0000 (UTC)
commit 43eeb009ce78588db9fba48574f377629d5de1aa
Author: Jonas Ådahl <jadahl gmail com>
Date: Mon Sep 25 17:57:18 2017 -0400
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
src/backends/meta-monitor-config-migration.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/meta-monitor-config-migration.c b/src/backends/meta-monitor-config-migration.c
index c862168..d619dc4 100644
--- a/src/backends/meta-monitor-config-migration.c
+++ b/src/backends/meta-monitor-config-migration.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]