~ubuntu-branches/ubuntu/precise/xorg-server-lts-trusty/precise-proposed

« back to all changes in this revision

Viewing changes to debian/patches/xrandr-rroutputchanged-main.patch

  • Committer: Package Import Robot
  • Author(s): Maarten Lankhorst
  • Date: 2014-05-29 11:23:45 UTC
  • Revision ID: package-import@ubuntu.com-20140529112345-nds4yarvo25d2r32
Tags: 2:1.15.1-0ubuntu2~precise1
Initial lts-trusty upload, i386/amd64 only. (LP: #1318616)

Show diffs side-by-side

added added

removed removed

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