Commit 068cf4c8 authored by Marco Trevisan's avatar Marco Trevisan 🎺

x11, monitor-manager: expose output scaling capability if randr is available

When randr extension version is major than 1.3, we can use transformations,
and in this case we can expose this capability to use related functions.
parent bab8a8a8
......@@ -46,6 +46,7 @@ typedef enum _MetaMonitorManagerCapability
META_MONITOR_MANAGER_CAPABILITY_LAYOUT_MODE = (1 << 1),
META_MONITOR_MANAGER_CAPABILITY_GLOBAL_SCALE_REQUIRED = (1 << 2),
META_MONITOR_MANAGER_CAPABILITY_TILING = (1 << 3),
META_MONITOR_MANAGER_CAPABILITY_NATIVE_OUTPUT_SCALING = (1 << 4)
} MetaMonitorManagerCapability;
/* Equivalent to the 'method' enum in org.gnome.Mutter.DisplayConfig */
......
......@@ -65,6 +65,7 @@
#define DPI_FALLBACK 96.0
#define RANDR_VERSION_FORMAT(major, minor) ((major * 100) + minor)
#define RANDR_TILING_MIN_VERSION RANDR_VERSION_FORMAT (1, 5)
#define RANDR_TRANSFOMR_MIN_VERSION RANDR_VERSION_FORMAT (1, 3)
struct _MetaMonitorManagerXrandr
{
......@@ -875,6 +876,9 @@ meta_monitor_manager_xrandr_get_capabilities (MetaMonitorManager *manager)
if (xrandr_manager->randr_version >= RANDR_TILING_MIN_VERSION)
capabilities |= META_MONITOR_MANAGER_CAPABILITY_TILING;
if (xrandr_manager->randr_version >= RANDR_TRANSFOMR_MIN_VERSION)
capabilities |= META_MONITOR_MANAGER_CAPABILITY_NATIVE_OUTPUT_SCALING;
return capabilities;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment