xserver-multidpi/randr
Alex Goins 6b26a7bda9 randr: Fix rotation check in ProcRRSetScreenSize()
ProcRRSetScreenSize() does bounds checking to ensure that none of the CRTCs have
a viewport that extends beyond the new screen size. In doing so, it accounts for
if the CRTC is rotated 90 or 270 degrees, swapping width and height.

However, it does so by testing if crtc->rotation is equal to RR_Rotate_90 or
RR_Rotate_270. crtc->rotation is a bit mask, and it includes reflection as well
as rotation. If a CRTC is reflected as well as rotated, it will incorrectly fail
this test, resulting in incorrect dimensions being used to verify the validity
of the new screen size. In some cases, this can cause valid uses of
ProcRRSetScreenSize() to fail with BadMatch.

This patch fixes the issue by testing that the bits RR_Rotate_90 or
RR_Rotate_270 are set, rather than testing for equality.

Signed-off-by: Alex Goins <agoins@nvidia.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2018-02-01 16:36:59 -05:00
..
Makefile.am randr: Add Monitor support (v1.1) 2015-03-31 12:32:04 +10:00
meson.build Add a Meson build system alongside autotools. 2017-04-26 15:25:27 -07:00
randr.c dispatch: Mark swapped dispatch as _X_COLD 2017-03-01 10:16:20 -05:00
randrstr.h randr: Declare incoming property values const 2018-01-22 17:22:21 -05:00
rrcrtc.c randr: free crtc->outputs on destroy 2017-11-20 16:13:28 -05:00
rrdispatch.c randr: Allow RRSelectInput for ProviderChange and ResourceChange events 2015-09-23 13:12:21 -04:00
rrinfo.c Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
rrmode.c Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
rrmonitor.c rrmonitor: allocate using the correct type 2018-01-31 14:43:56 -05:00
rroutput.c randr: always realloc crtcs and outputs 2017-11-20 16:13:20 -05:00
rrpointer.c randr: Fix logic in RRPointerToNearestCrtc 2014-07-30 14:40:17 -07:00
rrproperty.c randr: Declare incoming property values const 2018-01-22 17:22:21 -05:00
rrprovider.c randr: fix xserver crash when xrandr setprovideroutputsource 2017-01-11 11:13:45 +10:00
rrproviderproperty.c Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
rrscreen.c randr: Fix rotation check in ProcRRSetScreenSize() 2018-02-01 16:36:59 -05:00
rrsdispatch.c dispatch: Mark swapped dispatch as _X_COLD 2017-03-01 10:16:20 -05:00
rrtransform.c randr: Silence -Wshift-negative-value warnings 2015-10-19 11:51:52 -04:00
rrtransform.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
rrxinerama.c dispatch: Mark swapped dispatch as _X_COLD 2017-03-01 10:16:20 -05:00