diff options
author | Matthias Hopf <mhopf@suse.de> | 2008-12-08 12:24:37 +0100 |
---|---|---|
committer | Matthias Hopf <mhopf@suse.de> | 2008-12-08 12:24:37 +0100 |
commit | 57cabac91099a8abd5afad75de64e54930c078ec (patch) | |
tree | be5fb0bd7804961a68caa96225651a485220db09 | |
parent | 970f689651fc86fa7a2ba24f0fab5f86f01af349 (diff) |
Only set transforms if actually changed.
Re-enables other crtc settings if transforms are not supported.
-rw-r--r-- | xrandr.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); |