[gnome-flashback] monitor: check mode resolution area when determining advertisability



commit a9b2199197a3f42baf7dff74abc179ee269fd608
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sat Aug 17 23:28:26 2019 +0300

    monitor: check mode resolution area when determining advertisability
    
    Based on mutter commit:
    https://gitlab.gnome.org/GNOME/mutter/commit/989a281b5f8fea9474ebbe

 backends/gf-monitor.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/backends/gf-monitor.c b/backends/gf-monitor.c
index 6f31632..9b7bbaf 100644
--- a/backends/gf-monitor.c
+++ b/backends/gf-monitor.c
@@ -36,8 +36,7 @@
 #define SCALE_FACTORS_PER_INTEGER 4
 #define MINIMUM_SCALE_FACTOR 1.0f
 #define MAXIMUM_SCALE_FACTOR 4.0f
-#define MINIMUM_LOGICAL_WIDTH 800
-#define MINIMUM_LOGICAL_HEIGHT 480
+#define MINIMUM_LOGICAL_AREA (800 * 480)
 #define MAXIMUM_REFRESH_RATE_DIFF 0.001f
 
 /* The minimum screen height at which we turn on a window-scale of 2;
@@ -300,8 +299,7 @@ static gboolean
 is_logical_size_large_enough (gint width,
                               gint height)
 {
-  return width >= MINIMUM_LOGICAL_WIDTH &&
-         height >= MINIMUM_LOGICAL_HEIGHT;
+  return width * height >= MINIMUM_LOGICAL_AREA;
 }
 
 static gfloat


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]