[gnome-flashback] monitor-manager: derive configured global scale using common value
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] monitor-manager: derive configured global scale using common value
- Date: Sat, 23 Oct 2021 18:48:44 +0000 (UTC)
commit 74ce4bf5b58eeb45de87142334cd4fbb207e4409
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Sep 12 23:03:39 2021 +0300
monitor-manager: derive configured global scale using common value
Based on mutter commit:
https://gitlab.gnome.org/GNOME/mutter/-/commit/1ab79c79a529
backends/gf-monitor-manager.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/backends/gf-monitor-manager.c b/backends/gf-monitor-manager.c
index b6310c9..0bf9593 100644
--- a/backends/gf-monitor-manager.c
+++ b/backends/gf-monitor-manager.c
@@ -357,11 +357,19 @@ static gfloat
derive_configured_global_scale (GfMonitorManager *manager,
GfMonitorsConfig *config)
{
- GfLogicalMonitorConfig *logical_monitor_config;
+ GList *l;
- logical_monitor_config = config->logical_monitor_configs->data;
+ for (l = config->logical_monitor_configs; l; l = l->next)
+ {
+ GfLogicalMonitorConfig *monitor_config;
+
+ monitor_config = l->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 gfloat
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]