summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-12-28 18:24:00 +0100
committerDanny Baumann <dannybaumann@web.de>2008-12-28 18:24:00 +0100
commit92132d820d173b6cc2f8786efb9824b6f8780744 (patch)
tree5dfff10c790dac833cf7ecc3d80064d2e1d9bcd6
parent91a76e4f5144e67a66316c910da03c0f1a662a13 (diff)
downloadput-92132d820d173b6cc2f8786efb9824b6f8780744.tar.gz
put-92132d820d173b6cc2f8786efb9824b6f8780744.tar.bz2
Factor out window movement ending into separate function and only update
window attributes if needed.
-rw-r--r--put.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/put.c b/put.c
index 7b2b025..c678773 100644
--- a/put.c
+++ b/put.c
@@ -152,6 +152,20 @@ adjustPutVelocity (CompWindow *w)
return 1;
}
+static void
+putFinishWindowMovement (CompWindow *w)
+{
+ XWindowChanges xwc;
+
+ xwc.x = pw->targetX;
+ xwc.y = pw->targetY;
+
+ configureXWindow (w, CWX | CWY, &xwc);
+
+ if (w->state & (MAXIMIZE_STATE | CompWindowStateFullscreenMask))
+ updateWindowAttributes (w, CompStackingUpdateModeNone);
+}
+
/*
* setup for paint screen
*/
@@ -193,10 +207,8 @@ putPreparePaintScreen (CompScreen *s,
if (!pw->adjust)
{
/* animation done */
- moveWindow (w, pw->targetX - w->attrib.x,
- pw->targetY - w->attrib.y, TRUE, TRUE);
- syncWindowPosition (w);
- updateWindowAttributes (w, CompStackingUpdateModeNone);
+ putFinishWindowMovement (w);
+
endAnimationWindow = w->id;
pw->tx = pw->ty = 0;
}