summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-02-12 14:34:41 +0100
committerDanny Baumann <dannybaumann@web.de>2008-02-12 14:34:41 +0100
commitc4bd6b35ace27d2106fef33a0c1b1d9ae28de9cf (patch)
treed4e110afabba83f1e2734f2fab1aedf17065df58
parentbba000d3e1d30f47596c79307426381c1b75022f (diff)
downloadshelf-c4bd6b35ace27d2106fef33a0c1b1d9ae28de9cf.tar.gz
shelf-c4bd6b35ace27d2106fef33a0c1b1d9ae28de9cf.tar.bz2
Fix damage handling.
-rw-r--r--shelf.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/shelf.c b/shelf.c
index 79fb9f0..07b955f 100644
--- a/shelf.c
+++ b/shelf.c
@@ -26,7 +26,6 @@
* Todo:
* - Check for XShape events
* - Handle input in a sane way
- * - Correct damage handeling
* - Mouse-over?
*/
@@ -701,10 +700,6 @@ shelfHandleEvent (CompDisplay *d,
/* The window was damaged, adjust the damage to fit the actual area we
* care about.
- *
- * FIXME:
- * This should not cause total screen damage, but only adjust the rect
- * correctly.
*/
static Bool
shelfDamageWindowRect (CompWindow *w,
@@ -717,7 +712,7 @@ shelfDamageWindowRect (CompWindow *w,
if (sw->scale != 1.0f)
{
- damageScreen (w->screen);
+ damageTransformedWindowRect (w, sw->scale, sw->scale, 0, 0, rect);
status = TRUE;
}
@@ -756,14 +751,10 @@ shelfPaintWindow (CompWindow *w,
if (sw->scale != 1.0f)
{
CompTransform mTransform = *transform;
- int xOrigin, yOrigin;
- xOrigin = w->attrib.x - w->input.left;
- yOrigin = w->attrib.y - w->input.top;
-
- matrixTranslate (&mTransform, xOrigin, yOrigin, 0);
+ matrixTranslate (&mTransform, w->attrib.x, w->attrib.y, 0);
matrixScale (&mTransform, sw->scale, sw->scale, 0);
- matrixTranslate (&mTransform, -xOrigin, -yOrigin, 0);
+ matrixTranslate (&mTransform, -w->attrib.x, -w->attrib.y, 0);
mask |= PAINT_WINDOW_TRANSFORMED_MASK;