[mutter] monitor: Add scale 1 if no other supported scale was added
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] monitor: Add scale 1 if no other supported scale was added
- Date: Wed, 20 Sep 2017 09:39:31 +0000 (UTC)
commit 67ce04993ee05bd1cd19a51ca351eca6574a2064
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
src/backends/meta-monitor.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/meta-monitor.c b/src/backends/meta-monitor.c
index ed48a45..8ca6ea8 100644
--- a/src/backends/meta-monitor.c
+++ b/src/backends/meta-monitor.c
@@ -1550,6 +1550,14 @@ meta_monitor_calculate_supported_scales (MetaMonitor *monitor,
}
}
+ if (supported_scales->len == 0)
+ {
+ float fallback_scale;
+
+ fallback_scale = 1.0;
+ g_array_append_val (supported_scales, fallback_scale);
+ }
+
*n_supported_scales = supported_scales->len;
return (float *) g_array_free (supported_scales, FALSE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]