summaryrefslogtreecommitdiff
path: root/randr/rrcrtc.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2007-07-14 08:47:50 -0700
committerKeith Packard <keithp@neko.keithp.com>2007-07-14 09:03:47 -0700
commit8773ad023eb28950eb0f802d2ca31a67f84adddc (patch)
tree5b161d6d57f173d35710e492cfce77c108a5a5d9 /randr/rrcrtc.c
parent881a620b4d6ea7a54af14c8f8fbe6924c9aa9291 (diff)
Screen size bounds check in ProcRRSetCrtcConfig not masking out reflections.
When checking how to validate the selected mode and position against the current screen size, the test against 90/270 rotation did not mask out reflection, so that when reflection was specified, the 90/270 test would never succeed. This caused incorrect bounds checking and would return an error to the user instead of rotating the screen.
Diffstat (limited to 'randr/rrcrtc.c')
-rw-r--r--randr/rrcrtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index c8c2be264..3ce9e2155 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -794,7 +794,7 @@ ProcRRSetCrtcConfig (ClientPtr client)
int source_width = mode->mode.width;
int source_height = mode->mode.height;
- if (rotation == RR_Rotate_90 || rotation == RR_Rotate_270)
+ if ((rotation & 0xf) == RR_Rotate_90 || (rotation & 0xf) == RR_Rotate_270)
{
source_width = mode->mode.height;
source_height = mode->mode.width;