Ok, let me make sure I understand this:

- your monitor is currently rotated 90 degrees
- in that configuration, it is 1200 pixels horizontally and 1600 pixels vertically
- you have RANDR 1.2

So, in that state, test-randr shows:

test-randr: 10:03:45:   Current Rotation:        90
test-randr: 10:03:45:   + size 0: 1600 x 1200    rates: 60
test-randr: 10:03:45:   + CRTC 0 (73): 1200x1600+0+0

What that means, code-wise, is:

XRRConfigRotations() => RR_Rotate_90
XRRConfigSizes() => width=1600, height=1200
XRRGetCrtcInfo() => width=1200, height=1600

So, the thing that made me put those "swap" clauses in was this thread:
http://jwz.livejournal.com/908354.html?thread=17459266
but I see now that he has RANDR 1.1.

So now I'm thinking that the first swap clause is needed (because in 1.1, I'm reading the size out of XRRScreenSize) but the second clause is not (because in 1.2, I'm reading out of XRRCrtcInfo).

Does that sound right?

In other words:


--- screens.c.~43~      2008-08-14 01:47:21.000000000 -0700
+++ screens.c   2008-08-14 02:09:29.000000000 -0700
@@ -445,16 +445,11 @@
               m->x        = crtci->x;
               m->y        = crtci->y;

-              if (crtci->rotation & (RR_Rotate_90|RR_Rotate_270))
-                {
-                  m->width  = crtci->height;
-                  m->height = crtci->width;
-                }
-              else
-                {
-                  m->width  = crtci->width;
-                  m->height = crtci->height;
-                }
+ /* Note: if the screen is rotated, XRRConfigSizes contains + the unrotated WxH, but XRRCrtcInfo contains rotated HxW.
+               */
+              m->width  = crtci->width;
+              m->height = crtci->height;

               j++;





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to