ODROID-U3 xorg-server debian package fork :
[deb_xorg-server.git] / debian / patches / xrandr-rroutputchanged-main.patch
CommitLineData
7217e0ca
ML
1From e78c75f5e19cf38f276b1631078f87b502fdc555 Mon Sep 17 00:00:00 2001
2From: Alberto Milone <alberto.milone@canonical.com>
3Date: Sun, 8 Dec 2013 10:00:08 +0100
4Subject: [PATCH 1/1] randr: make RROutputChanged change the main protocol
5 screen not the gpu screen
6
7We only set changes on the main protocol screen as, for example
8in RRSetChanged() and RRTellChanged(), therefore we should follow
9the same logic when reporting that an output changed in
10RROutputChanged().
11
12This means that RRTellChanged() will then update the relevant
13timestamps also when events come from gpu screens.
14
15Reviewed-by: Dave Airlie <airlied@redhat.com>
16Signed-off-by: Alberto Milone <alberto.milone@canonical.com>
17---
18 randr/rroutput.c | 25 ++++++++++++++++++++-----
19 1 file changed, 20 insertions(+), 5 deletions(-)
20
7217e0ca
ML
21--- a/randr/rroutput.c
22+++ b/randr/rroutput.c
23@@ -31,15 +31,30 @@ RESTYPE RROutputType;
24 void
25 RROutputChanged(RROutputPtr output, Bool configChanged)
26 {
27+ /* set changed bits on the master screen only */
28 ScreenPtr pScreen = output->pScreen;
29
30 output->changed = TRUE;
31- if (pScreen) {
32- rrScrPriv(pScreen);
33- RRSetChanged(pScreen);
34- if (configChanged)
35- pScrPriv->configChanged = TRUE;
36+ if (!pScreen)
37+ return;
38+
39+ ScreenPtr master;
40+ rrScrPriv(pScreen);
41+ rrScrPrivPtr mastersp;
42+
43+ if (pScreen->isGPU) {
44+ master = pScreen->current_master;
45+ if (!master)
46+ return;
47+ mastersp = rrGetScrPriv(master);
48 }
49+ else {
50+ mastersp = pScrPriv;
51+ }
52+
53+ RRSetChanged(pScreen);
54+ if (configChanged)
55+ mastersp->configChanged = TRUE;
56 }
57
58 /*