xserver-multidpi/randr
Alex Goins 61d3f56877 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>
(cherry picked from commit 6b26a7bda9)
2018-02-12 14:52:58 -05:00
..
Makefile.am randr: Add Monitor support (v1.1) 2015-03-31 12:32:04 +10:00
randr.c randr: Adjust master's last set time with slaves 2016-06-17 11:38:13 +02:00
randrstr.h randr: Add RRHasScanoutPixmap helper function 2016-09-13 10:26:47 +02:00
rrcrtc.c randr: Use RRTransformEqual in RRCrtcPendingTransform 2017-09-25 15:34:10 -04: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 xrandrprovider: Do not use separate lists for unbound / source / offload slaves 2016-06-17 11:35:58 +02:00
rroutput.c randr: ProcRRGetOutputInfo: initialize memory 2017-12-13 10:06:49 -05:00
rrpointer.c randr: Fix logic in RRPointerToNearestCrtc 2014-07-30 14:40:17 -07:00
rrproperty.c Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
rrprovider.c randr: fix xserver crash when xrandr setprovideroutputsource 2017-01-11 15:04:12 -05: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-12 14:52:58 -05:00
rrsdispatch.c randr: Add Monitor support (v1.1) 2015-03-31 12:32:04 +10: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 xinerama: Swap the response in RRXineramaWriteMonitor 2017-01-11 15:04:12 -05:00