[PATCH] xrandr: Fix bug in calling crtc_set_transform()

Nikhil Mahale nmahale at nvidia.com
Fri Aug 15 23:26:04 PDT 2014


Compare pending transformation with currently pending transformation on
server,
instead of comparing it with current transformation on server.

Signed-off-by: Nikhil Mahale <nmahale at nvidia.com>
---
 xrandr.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/xrandr.c b/xrandr.c
index 366f6dc..4097a52 100644
--- a/xrandr.c
+++ b/xrandr.c
@@ -324,7 +324,10 @@ struct _crtc {
     Rotation	    rotation;
     output_t	    **outputs;
     int		    noutput;
-    transform_t	    current_transform, pending_transform;
+    /* current and pending transformation on server */
+    transform_t	    current_transform, current_pending_transform;
+    /* pending transformation on client */
+    transform_t     pending_transform;
 };

 struct _output_prop {
@@ -1331,11 +1334,17 @@ get_crtcs (void)
 			   attr->currentFilter,
 			   attr->currentParams,
 			   attr->currentNparams);
+            set_transform (&crtcs[c].current_pending_transform,
+                           &attr->pendingTransform,
+                           attr->pendingFilter,
+                           attr->pendingParams,
+                           attr->pendingNparams);
 	    XFree (attr);
 	}
 	else
 	{
 	    init_transform (&crtcs[c].current_transform);
+            copy_transform (&crtcs[c].current_pending_transform,
&crtcs[c].current_transform);
 	}
 	copy_transform (&crtcs[c].pending_transform, &crtcs[c].current_transform);
    }
@@ -1568,7 +1577,7 @@ crtc_apply (crtc_t *crtc)
 	s = RRSetConfigSuccess;
     else
     {
-	if (!equal_transform (&crtc->current_transform, &crtc->pending_transform))
+	if (!equal_transform (&crtc->current_pending_transform,
&crtc->pending_transform))
 	    crtc_set_transform (crtc, &crtc->pending_transform);
 	s = XRRSetCrtcConfig (dpy, res, crtc->crtc.xid, CurrentTime,
 			      crtc->x, crtc->y, mode, crtc->rotation,
-- 
1.8.1.5

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------


More information about the xorg-devel mailing list