From e789daf1bc1df6ed7c8f4bf2b0ac6502c812c1b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Mon, 20 Feb 2012 02:24:49 +0100 Subject: [PATCH] clean dirty rect from repaints_region when updating shadow, skip double resetting of shadow rect REVIEW: 104028 --- scene.cpp | 6 ------ toplevel.cpp | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/scene.cpp b/scene.cpp index bb92fc1098..05411988ad 100644 --- a/scene.cpp +++ b/scene.cpp @@ -214,9 +214,6 @@ void Scene::paintGenericScreen(int orig_mask, ScreenPaintData) // This has to be done here because many effects schedule a repaint for // the next frame within Effects::prePaintWindow. topw->resetRepaints(topw->decorationRect()); - if (topw->hasShadow()) { - topw->resetRepaints(topw->shadow()->shadowRegion().boundingRect()); - } WindowPrePaintData data; data.mask = orig_mask | (w->isOpaque() ? PAINT_WINDOW_OPAQUE : PAINT_WINDOW_TRANSLUCENT); @@ -273,9 +270,6 @@ void Scene::paintSimpleScreen(int orig_mask, QRegion region) // This has to be done here because many effects schedule a repaint for // the next frame within Effects::prePaintWindow. topw->resetRepaints(topw->decorationRect()); - if (topw->hasShadow()) { - topw->resetRepaints(topw->shadow()->shadowRegion().boundingRect()); - } // Clip out the decoration for opaque windows; the decoration is drawn in the second pass if (w->isOpaque()) { // the window is fully opaque diff --git a/toplevel.cpp b/toplevel.cpp index ffe7f0c6ca..0716c2f566 100644 --- a/toplevel.cpp +++ b/toplevel.cpp @@ -366,6 +366,7 @@ void Toplevel::getShadow() if (hasShadow()) dirtyRect |= shadow()->shadowRegion().boundingRect(); if (dirtyRect.isValid()) { + resetRepaints(dirtyRect); dirtyRect.translate(pos()); workspace()->addRepaint(dirtyRect); }