Commit 3b83459d authored by Marco Trevisan's avatar Marco Trevisan 🎺

monitor-manager: Derive configured global scale using common value

When deriving the global scale form config, we need to ensure that the value
is matching all the monitor configurations.

If not, we should fallback to the normal scale value.

Fixes GNOME/mutter#407
parent 0390a924
......@@ -198,11 +198,17 @@ static float
derive_configured_global_scale (MetaMonitorManager *manager,
MetaMonitorsConfig *config)
MetaLogicalMonitorConfig *logical_monitor_config;
GList *l;
for (l = config->logical_monitor_configs; l; l = l->next)
MetaLogicalMonitorConfig *monitor_config = l->data;
logical_monitor_config = config->logical_monitor_configs->data;
if (is_global_scale_matching_in_config (config, monitor_config->scale))
return monitor_config->scale;
return logical_monitor_config->scale;
return 1.0f;
static float
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment