summaryrefslogtreecommitdiff
path: root/src/backends/x11/meta-monitor-manager-xrandr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backends/x11/meta-monitor-manager-xrandr.c')
-rw-r--r--src/backends/x11/meta-monitor-manager-xrandr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/backends/x11/meta-monitor-manager-xrandr.c b/src/backends/x11/meta-monitor-manager-xrandr.c
index 387a0ce8..39ee0798 100644
--- a/src/backends/x11/meta-monitor-manager-xrandr.c
+++ b/src/backends/x11/meta-monitor-manager-xrandr.c
@@ -58,6 +58,7 @@ struct _MetaMonitorManagerXrandr
XRRScreenResources *resources;
int rr_event_base;
int rr_error_base;
+ gboolean has_randr15;
};
struct _MetaMonitorManagerXrandrClass
@@ -1254,6 +1255,7 @@ meta_monitor_manager_xrandr_init (MetaMonitorManagerXrandr *manager_xrandr)
}
else
{
+ int major_version, minor_version;
/* We only use ScreenChangeNotify, but GDK uses the others,
and we don't want to step on its toes */
XRRSelectInput (manager_xrandr->xdisplay,
@@ -1261,6 +1263,16 @@ meta_monitor_manager_xrandr_init (MetaMonitorManagerXrandr *manager_xrandr)
RRScreenChangeNotifyMask
| RRCrtcChangeNotifyMask
| RROutputPropertyNotifyMask);
+
+ manager_xrandr->has_randr15 = FALSE;
+ XRRQueryVersion (manager_xrandr->xdisplay, &major_version,
+ &minor_version);
+#ifdef HAVE_XRANDR15
+ if (major_version > 1 ||
+ (major_version == 1 &&
+ minor_version >= 5))
+ manager_xrandr->has_randr15 = TRUE;
+#endif
}
}