summaryrefslogtreecommitdiff
blob: 48286996c72ecaea20ae304eeed4706d9a974c99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Title       : xorg-server-1.3: desktop does not resize with RandR
Assignee    : x11@gentoo.org
Reported    : 2007-06-30 11:37 0000
Updated     : 2007-10-06 08:32:58 0000
Status      : ASSIGNED
Severity    : normal
Priority    : P2
Reporter    : sascha.lucas@rus.uni-stuttgart.de
Product     : Gentoo Linux
Component   : KDE
Keywords    : Inclusion
CC          : caster@gentoo.org
CC          : chrschmitt@gmail.com
CC          : gentoo@chlhp.de
CC          : kde@gentoo.org
Comments    : 14
Attachments : 0
URL         : http://bugs.gentoo.org/show_bug.cgi?id=183721

commit c10df5b967d4da4e11786520317e2917de5541fa
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Tue Apr 3 15:47:01 2007 -0700

    Swap RRScreenChangeNotifyEvent dimensions when the screen has one crtc and it's rotated.

    RandR 1.1 clients expect the size fields in this event to be the unrotated
    dimensions of the screen.  This behavior is "weird", but that's the way the old
    code worked so we need to be bug-compatible with it.

diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index ad74ac3..f83fce3 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -116,11 +116,19 @@ RRDeliverScreenEvent (ClientPtr client, WindowPtr pWin, ScreenPtr pScreen)
 
     se.sequenceNumber = client->sequence;
     se.sizeID = RR10CurrentSizeID (pScreen);
-    
-    se.widthInPixels = pScreen->width;
-    se.heightInPixels = pScreen->height;
-    se.widthInMillimeters = pScreen->mmWidth;
-    se.heightInMillimeters = pScreen->mmHeight;
+
+    if (se.rotation & (RR_Rotate_90 | RR_Rotate_270)) {
+	se.widthInPixels = pScreen->height;
+	se.heightInPixels = pScreen->width;
+	se.widthInMillimeters = pScreen->mmHeight;
+	se.heightInMillimeters = pScreen->mmWidth;
+    } else {
+	se.widthInPixels = pScreen->width;
+	se.heightInPixels = pScreen->height;
+	se.widthInMillimeters = pScreen->mmWidth;
+	se.heightInMillimeters = pScreen->mmHeight;
+    }
+
     WriteEventsToClient (client, 1, (xEvent *) &se);
 }