|
|
2c033f |
From 016b8f5b4ac4631538061e29d7c3c4adb2122166 Mon Sep 17 00:00:00 2001
|
|
|
2c033f |
From: Rui Matos <tiagomatos@gmail.com>
|
|
|
2c033f |
Date: Thu, 16 Oct 2014 13:28:46 +0200
|
|
|
2c033f |
Subject: [PATCH] monitor-manager-xrandr: Use CurrentTime when applying
|
|
|
2c033f |
configurations
|
|
|
2c033f |
|
|
|
2c033f |
This is what the xrandr CLI tool does and will allow us to do less
|
|
|
2c033f |
work when we get RRScreenChangeNotify events.
|
|
|
2c033f |
|
|
|
2c033f |
https://bugzilla.gnome.org/show_bug.cgi?id=738630
|
|
|
2c033f |
---
|
|
|
2c033f |
src/backends/x11/meta-monitor-manager-xrandr.c | 8 +++-----
|
|
|
2c033f |
1 file changed, 3 insertions(+), 5 deletions(-)
|
|
|
2c033f |
|
|
|
2c033f |
diff --git a/src/backends/x11/meta-monitor-manager-xrandr.c b/src/backends/x11/meta-monitor-manager-xrandr.c
|
|
|
2c033f |
index 4f2590e..a5251fe 100644
|
|
|
2c033f |
--- a/src/backends/x11/meta-monitor-manager-xrandr.c
|
|
|
2c033f |
+++ b/src/backends/x11/meta-monitor-manager-xrandr.c
|
|
|
2c033f |
@@ -57,7 +57,6 @@ struct _MetaMonitorManagerXrandr
|
|
|
2c033f |
|
|
|
2c033f |
Display *xdisplay;
|
|
|
2c033f |
XRRScreenResources *resources;
|
|
|
2c033f |
- int time;
|
|
|
2c033f |
int rr_event_base;
|
|
|
2c033f |
int rr_error_base;
|
|
|
2c033f |
};
|
|
|
2c033f |
@@ -413,7 +412,6 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
|
|
|
2c033f |
return;
|
|
|
2c033f |
|
|
|
2c033f |
manager_xrandr->resources = resources;
|
|
|
2c033f |
- manager_xrandr->time = resources->configTimestamp;
|
|
|
2c033f |
manager->n_outputs = resources->noutput;
|
|
|
2c033f |
manager->n_crtcs = resources->ncrtc;
|
|
|
2c033f |
manager->n_modes = resources->nmode;
|
|
|
2c033f |
@@ -747,7 +745,7 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
|
|
|
2c033f |
XRRSetCrtcConfig (manager_xrandr->xdisplay,
|
|
|
2c033f |
manager_xrandr->resources,
|
|
|
2c033f |
(XID)crtc->crtc_id,
|
|
|
2c033f |
- manager_xrandr->time,
|
|
|
2c033f |
+ CurrentTime,
|
|
|
2c033f |
0, 0,
|
|
|
2c033f |
None,
|
|
|
2c033f |
RR_Rotate_0,
|
|
|
2c033f |
@@ -777,7 +775,7 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
|
|
|
2c033f |
XRRSetCrtcConfig (manager_xrandr->xdisplay,
|
|
|
2c033f |
manager_xrandr->resources,
|
|
|
2c033f |
(XID)crtc->crtc_id,
|
|
|
2c033f |
- manager_xrandr->time,
|
|
|
2c033f |
+ CurrentTime,
|
|
|
2c033f |
0, 0,
|
|
|
2c033f |
None,
|
|
|
2c033f |
RR_Rotate_0,
|
|
|
2c033f |
@@ -860,7 +858,7 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
|
|
|
2c033f |
ok = XRRSetCrtcConfig (manager_xrandr->xdisplay,
|
|
|
2c033f |
manager_xrandr->resources,
|
|
|
2c033f |
(XID)crtc->crtc_id,
|
|
|
2c033f |
- manager_xrandr->time,
|
|
|
2c033f |
+ CurrentTime,
|
|
|
2c033f |
crtc_info->x, crtc_info->y,
|
|
|
2c033f |
(XID)mode->mode_id,
|
|
|
2c033f |
meta_monitor_transform_to_xrandr (crtc_info->transform),
|
|
|
2c033f |
--
|
|
|
2c033f |
2.4.3
|
|
|
2c033f |
|