summaryrefslogtreecommitdiff
path: root/shelf.c
diff options
context:
space:
mode:
Diffstat (limited to 'shelf.c')
-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;