[mutter] monitor: Check mode resolution area when determining advertisability
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] monitor: Check mode resolution area when determining advertisability
- Date: Tue, 13 Aug 2019 15:09:19 +0000 (UTC)
commit 989a281b5f8fea9474ebbefaaad537520133666e
Author: Jonas Ådahl <jadahl gmail com>
Date: Mon Aug 12 10:52:48 2019 +0200
monitor: Check mode resolution area when determining advertisability
Explicitly checking the dimensions of a mode to determine whether it
should be advertised or not fails for portrait style modes. Avoid this
by checking the area instead.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/722
src/backends/meta-monitor.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/backends/meta-monitor.c b/src/backends/meta-monitor.c
index c4311a56f..a6a57c6d5 100644
--- a/src/backends/meta-monitor.c
+++ b/src/backends/meta-monitor.c
@@ -34,8 +34,7 @@
#define SCALE_FACTORS_STEPS (1.0 / (float) SCALE_FACTORS_PER_INTEGER)
#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.001
typedef struct _MetaMonitorMode
@@ -1661,8 +1660,7 @@ static gboolean
is_logical_size_large_enough (int width,
int height)
{
- return width >= MINIMUM_LOGICAL_WIDTH &&
- height >= MINIMUM_LOGICAL_HEIGHT;
+ return width * height >= MINIMUM_LOGICAL_AREA;
}
gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]