summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-02-12 14:45:15 +0100
committerDanny Baumann <dannybaumann@web.de>2008-02-12 14:45:15 +0100
commit1c1d074cd7ec2d357c3dbfa60598fa3a4664062f (patch)
tree2f842d25b02c071c1e7604c5bf541c3b43c15610
parentc4bd6b35ace27d2106fef33a0c1b1d9ae28de9cf (diff)
downloadshelf-1c1d074cd7ec2d357c3dbfa60598fa3a4664062f.tar.gz
shelf-1c1d074cd7ec2d357c3dbfa60598fa3a4664062f.tar.bz2
Keep upper left corner at the same point.
-rw-r--r--shelf.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/shelf.c b/shelf.c
index 07b955f..76f0350 100644
--- a/shelf.c
+++ b/shelf.c
@@ -712,7 +712,8 @@ shelfDamageWindowRect (CompWindow *w,
if (sw->scale != 1.0f)
{
- damageTransformedWindowRect (w, sw->scale, sw->scale, 0, 0, rect);
+ damageTransformedWindowRect (w, sw->scale, sw->scale,
+ -w->input.left, -w->input.top, rect);
status = TRUE;
}
@@ -751,10 +752,14 @@ shelfPaintWindow (CompWindow *w,
if (sw->scale != 1.0f)
{
CompTransform mTransform = *transform;
+ int xOrigin, yOrigin;
- matrixTranslate (&mTransform, w->attrib.x, w->attrib.y, 0);
+ xOrigin = w->attrib.x - w->input.left;
+ yOrigin = w->attrib.y - w->input.top;
+
+ matrixTranslate (&mTransform, xOrigin, yOrigin, 0);
matrixScale (&mTransform, sw->scale, sw->scale, 0);
- matrixTranslate (&mTransform, -w->attrib.x, -w->attrib.y, 0);
+ matrixTranslate (&mTransform, -xOrigin, -yOrigin, 0);
mask |= PAINT_WINDOW_TRANSFORMED_MASK;