summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Hopf <mhopf@suse.de>2008-12-08 12:24:37 +0100
committerMatthias Hopf <mhopf@suse.de>2008-12-08 12:24:37 +0100
commit57cabac91099a8abd5afad75de64e54930c078ec (patch)
treebe5fb0bd7804961a68caa96225651a485220db09
parent970f689651fc86fa7a2ba24f0fab5f86f01af349 (diff)
Only set transforms if actually changed.
Re-enables other crtc settings if transforms are not supported.
-rw-r--r--xrandr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xrandr.c b/xrandr.c
index 45200c5..685de1f 100644
--- a/xrandr.c
+++ b/xrandr.c
@@ -1210,7 +1210,8 @@ crtc_revert (crtc_t *crtc)
if (dryrun)
return RRSetConfigSuccess;
- crtc_set_transform (crtc, &crtc->current_transform);
+ if (!equal_transform (&crtc->current_transform, &crtc->pending_transform))
+ crtc_set_transform (crtc, &crtc->current_transform);
return XRRSetCrtcConfig (dpy, res, crtc->crtc.xid, CurrentTime,
crtc_info->x, crtc_info->y,
crtc_info->mode, crtc_info->rotation,
@@ -1247,7 +1248,8 @@ crtc_apply (crtc_t *crtc)
s = RRSetConfigSuccess;
else
{
- crtc_set_transform (crtc, &crtc->pending_transform);
+ if (!equal_transform (&crtc->current_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,
rr_outputs, crtc->noutput);