[gnome-flashback] monitor: add scale 1 if no other supported scale was added
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] monitor: add scale 1 if no other supported scale was added
- Date: Thu, 21 Sep 2017 00:07:48 +0000 (UTC)
commit 94da488c51e38377426d2e26dbf6252afd97e14b
Author: Jonas Ådahl <jadahl gmail com>
Date: Mon Sep 11 14:12:29 2017 +0800
monitor: add scale 1 if no other supported scale was added
We currently have a hard coded limit on logical monitor sizes, meant
for filtering out monitor scales that would result in awkward desktop
sizes. This has the side effect of also disqualifying scale 1 for
resolutions that themself are lower than the mentioned limit. To avoid
listing no supported scales, always add the fallback scale 1 if no
other was added.
https://bugzilla.gnome.org/show_bug.cgi?id=787477
backends/gf-monitor.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/backends/gf-monitor.c b/backends/gf-monitor.c
index 61d94fd..b6efbe4 100644
--- a/backends/gf-monitor.c
+++ b/backends/gf-monitor.c
@@ -852,6 +852,15 @@ gf_monitor_calculate_supported_scales (GfMonitor *monitor,
}
}
+ if (supported_scales->len == 0)
+ {
+ gfloat fallback_scale;
+
+ fallback_scale = 1.0;
+
+ g_array_append_val (supported_scales, fallback_scale);
+ }
+
*n_supported_scales = supported_scales->len;
return (gfloat *) g_array_free (supported_scales, FALSE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]