diff options
author | Danny Baumann <dannybaumann@web.de> | 2008-12-28 19:01:44 +0100 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2008-12-28 19:01:44 +0100 |
commit | 2198f056cce3f6426eee9b6be3f6ffc2bfd8f7c9 (patch) | |
tree | b1b4aa14c9815ea57af6801166701915a96c5291 | |
parent | 3373dab29228b7df579cfcf8f5ef6344c00eba8c (diff) | |
download | put-2198f056cce3f6426eee9b6be3f6ffc2bfd8f7c9.tar.gz put-2198f056cce3f6426eee9b6be3f6ffc2bfd8f7c9.tar.bz2 |
Correctly reflect output during animation.
-rw-r--r-- | put.c | 40 |
1 files changed, 21 insertions, 19 deletions
@@ -317,6 +317,25 @@ putPaintWindow (CompWindow *w, return status; } +static unsigned int +putGetOutputForWindow (CompWindow *w) +{ + PUT_WINDOW (w); + + if (!pw->adjust) + return outputDeviceForWindow (w); + + /* outputDeviceForWindow uses the server geometry, + so specialcase a running animation, which didn't + apply the server geometry yet */ + return outputDeviceForGeometry (w->screen, + w->attrib.x + pw->tx, + w->attrib.y + pw->ty, + w->attrib.width, + w->attrib.height, + w->attrib.border_width); +} + static Bool putGetDistance (CompWindow *w, PutType type, @@ -345,24 +364,7 @@ putGetDistance (CompWindow *w, this wasn't a double tap */ if (pd->lastType != type || pd->lastWindow != w->id) - { - if (pw->adjust) - { - /* outputDeviceForWindow uses the server geometry, - so specialcase a running animation, which didn't - apply the server geometry yet */ - output = outputDeviceForGeometry (s, - w->attrib.x + pw->tx, - w->attrib.y + pw->ty, - w->attrib.width, - w->attrib.height, - w->attrib.border_width); - } - else - { - output = outputDeviceForWindow (w); - } - } + output = putGetOutputForWindow (w); } else { @@ -510,7 +512,7 @@ putGetDistance (CompWindow *w, if (s->nOutputDev < 2) return FALSE; - currentNum = outputDeviceForWindow (w); + currentNum = putGetOutputForWindow (w); outputNum = (currentNum + 1) % s->nOutputDev; outputNum = getIntOptionNamed (option, nOption, "output", outputNum); |