mirror of
https://github.com/brl/mutter.git
synced 2025-02-19 14:44:10 +00:00
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
This commit is contained in:
parent
18838bcefc
commit
989a281b5f
@ -34,8 +34,7 @@
|
|||||||
#define SCALE_FACTORS_STEPS (1.0 / (float) SCALE_FACTORS_PER_INTEGER)
|
#define SCALE_FACTORS_STEPS (1.0 / (float) SCALE_FACTORS_PER_INTEGER)
|
||||||
#define MINIMUM_SCALE_FACTOR 1.0f
|
#define MINIMUM_SCALE_FACTOR 1.0f
|
||||||
#define MAXIMUM_SCALE_FACTOR 4.0f
|
#define MAXIMUM_SCALE_FACTOR 4.0f
|
||||||
#define MINIMUM_LOGICAL_WIDTH 800
|
#define MINIMUM_LOGICAL_AREA (800 * 480)
|
||||||
#define MINIMUM_LOGICAL_HEIGHT 480
|
|
||||||
#define MAXIMUM_REFRESH_RATE_DIFF 0.001
|
#define MAXIMUM_REFRESH_RATE_DIFF 0.001
|
||||||
|
|
||||||
typedef struct _MetaMonitorMode
|
typedef struct _MetaMonitorMode
|
||||||
@ -1661,8 +1660,7 @@ static gboolean
|
|||||||
is_logical_size_large_enough (int width,
|
is_logical_size_large_enough (int width,
|
||||||
int height)
|
int height)
|
||||||
{
|
{
|
||||||
return width >= MINIMUM_LOGICAL_WIDTH &&
|
return width * height >= MINIMUM_LOGICAL_AREA;
|
||||||
height >= MINIMUM_LOGICAL_HEIGHT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
Loading…
x
Reference in New Issue
Block a user