From 537557f6d33822a8e015dee86bf0cd9f842e7c5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Thu, 18 Sep 2008 15:28:13 +0000 Subject: [PATCH] Disable shadow with effects that transform windows, such as wobbly, since shadow currently can't handle that. (bug 161330) svn path=/branches/KDE/4.1/kdebase/workspace/; revision=862313 --- effects/shadow.cpp | 4 ++-- lib/kwineffects.cpp | 8 ++++++++ lib/kwineffects.h | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/effects/shadow.cpp b/effects/shadow.cpp index ee48f9f924..f75515fc8f 100644 --- a/effects/shadow.cpp +++ b/effects/shadow.cpp @@ -174,7 +174,7 @@ void ShadowEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data void ShadowEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data, int time ) { - if( useShadow( w )) + if( useShadow( w ) && !data.quads.isTransformed()) { data.paint |= shadowRectangle( data.paint.boundingRect() ); } @@ -192,7 +192,7 @@ void ShadowEffect::drawWindow( EffectWindow* w, int mask, QRegion region, Window // first we need to draw all queued shadows. drawQueuedShadows( w ); } - if( useShadow( w )) + if( useShadow( w ) && !data.quads.isTransformed()) { if( !optimize ) { diff --git a/lib/kwineffects.cpp b/lib/kwineffects.cpp index 1073670faa..2063c834b4 100644 --- a/lib/kwineffects.cpp +++ b/lib/kwineffects.cpp @@ -741,6 +741,14 @@ bool WindowQuadList::smoothNeeded() const return false; } +bool WindowQuadList::isTransformed() const + { + foreach( WindowQuad q, *this ) + if( q.isTransformed()) + return true; + return false; + } + /*************************************************************** PaintClipper ***************************************************************/ diff --git a/lib/kwineffects.h b/lib/kwineffects.h index 32397b7c23..e901a11f02 100644 --- a/lib/kwineffects.h +++ b/lib/kwineffects.h @@ -831,6 +831,7 @@ class KWIN_EXPORT WindowQuadList WindowQuadList filterOut( WindowQuadType type ) const; bool smoothNeeded() const; void makeArrays( float** vertices, float** texcoords ) const; + bool isTransformed() const; }; class KWIN_EXPORT WindowPrePaintData