mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
monitor-manager: Derive configured global scale using common value
When deriving the global scale from 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 https://gitlab.gnome.org/GNOME/mutter/issues/407 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/336>
This commit is contained in:
@ -219,11 +219,17 @@ static float
|
||||
derive_configured_global_scale (MetaMonitorManager *manager,
|
||||
MetaMonitorsConfig *config)
|
||||
{
|
||||
MetaLogicalMonitorConfig *logical_monitor_config;
|
||||
GList *l;
|
||||
|
||||
logical_monitor_config = config->logical_monitor_configs->data;
|
||||
for (l = config->logical_monitor_configs; l; l = l->next)
|
||||
{
|
||||
MetaLogicalMonitorConfig *monitor_config = l->data;
|
||||
|
||||
return logical_monitor_config->scale;
|
||||
if (is_global_scale_matching_in_config (config, monitor_config->scale))
|
||||
return monitor_config->scale;
|
||||
}
|
||||
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
static float
|
||||
|
Reference in New Issue
Block a user