summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierpaolo Follia <pfollia@gmail.com>2007-07-02 20:18:30 -0400
committerPierpaolo Follia <pfollia@gmail.com>2007-07-02 20:18:30 -0400
commit4e3370f90a46a61d19449c6ad03538af16216105 (patch)
tree65acf4bafea6e7ad947b8b16b42d7d060629822c
parent464b824fde09607ff9ea0d673dd08a2644a86ea8 (diff)
downloadput-4e3370f90a46a61d19449c6ad03538af16216105.tar.gz
put-4e3370f90a46a61d19449c6ad03538af16216105.tar.bz2
Make put respect target position.
-rw-r--r--put.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/put.c b/put.c
index 5d18316..6d3007c 100644
--- a/put.c
+++ b/put.c
@@ -134,6 +134,9 @@ static int adjustPutVelocity(CompWindow * w)
pw->dx = pw->dy = 0;
+ dx = (pw->lastX + pw->tx) - pw->x;
+ dy = (pw->lastY + pw->ty) - pw->y;
+ moveWindow(w, dx, dy, TRUE, TRUE);
/* sync position with X server */
syncWindowPosition(w);
return 0;
@@ -169,9 +172,6 @@ static void putPreparePaintScreen(CompScreen * s, int msSinceLastPaint)
if (pw->adjust)
{
- pw->adjust = adjustPutVelocity(w);
- ps->moreAdjust |= pw->adjust;
-
pw->tx += pw->xVelocity * chunk;
pw->ty += pw->yVelocity * chunk;
@@ -183,6 +183,8 @@ static void putPreparePaintScreen(CompScreen * s, int msSinceLastPaint)
pw->x += dx;
pw->y += dy;
+ pw->adjust = adjustPutVelocity(w);
+ ps->moreAdjust |= pw->adjust;
}
}
if (!ps->moreAdjust)