clean dirty rect from repaints_region when updating shadow, skip double resetting of shadow rect

REVIEW: 104028
This commit is contained in:
Thomas Lübking 2012-02-20 02:24:49 +01:00
parent 152b738181
commit e789daf1bc
2 changed files with 1 additions and 6 deletions

View file

@ -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

View file

@ -366,6 +366,7 @@ void Toplevel::getShadow()
if (hasShadow())
dirtyRect |= shadow()->shadowRegion().boundingRect();
if (dirtyRect.isValid()) {
resetRepaints(dirtyRect);
dirtyRect.translate(pos());
workspace()->addRepaint(dirtyRect);
}