From 2922ef272e25b084e11d229bfe2a7d918df66913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 23 Oct 2007 14:20:37 +0000 Subject: [PATCH] Don't cause painting in unrelated parts. svn path=/trunk/KDE/kdebase/workspace/; revision=728509 --- effects/shadow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/effects/shadow.cpp b/effects/shadow.cpp index d69f41cb29..0f900134d1 100644 --- a/effects/shadow.cpp +++ b/effects/shadow.cpp @@ -13,6 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include +#include #include namespace KWin @@ -46,7 +47,9 @@ void ShadowEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data, in if( useShadow( w )) { data.mask |= PAINT_WINDOW_TRANSLUCENT; - data.paint |= QRegion( shadowRectangle( ( QRegion( w->geometry()) & data.paint ).boundingRect() )); + QRect r = ( QRegion( w->geometry()) & data.paint ).boundingRect(); + if( !r.isEmpty()) + data.paint |= shadowRectangle( r ); } effects->prePaintWindow( w, data, time ); }