From 358f0bcd4f6703302b8895e42e20d1cbdfff102e Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Thu, 15 Jun 2017 14:28:27 -0700 Subject: randr: Use RRTransformEqual in RRCrtcPendingTransform MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, RRCrtcPendingTransform returns false unless the transformation matrix itself is changing. This makes RRCrtcSet skip doing anything if the only thing that is changing is the transform filter. There's already a function for comparing RRTransformPtrs, so use that instead. Tested by running xrandr --output DP-1 --mode 1920x1080 --rate 144 --scale 0.5x0.5 --filter nearest follwed by xrandr --output DP-1 --mode 1920x1080 --rate 144 --scale 0.5x0.5 --filter bilinear Signed-off-by: Aaron Plattner Reviewed-and-Tested-by: Michel Dänzer (cherry picked from commit 091af80be48c37f16c679d35fc12ad33e6b0cd74) --- randr/rrcrtc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'randr') diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index d1a51f0aa..401a1c178 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -843,9 +843,8 @@ RRCrtcGetTransform(RRCrtcPtr crtc) Bool RRCrtcPendingTransform(RRCrtcPtr crtc) { - return memcmp(&crtc->client_current_transform.transform, - &crtc->client_pending_transform.transform, - sizeof(PictTransform)) != 0; + return !RRTransformEqual(&crtc->client_current_transform, + &crtc->client_pending_transform); } /* -- cgit v1.2.3