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
This commit is contained in:
Luboš Luňák 2008-09-18 15:28:13 +00:00
parent b2cb3f475d
commit 537557f6d3
3 changed files with 11 additions and 2 deletions

View file

@ -174,7 +174,7 @@ void ShadowEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data
void ShadowEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data, int time ) void ShadowEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data, int time )
{ {
if( useShadow( w )) if( useShadow( w ) && !data.quads.isTransformed())
{ {
data.paint |= shadowRectangle( data.paint.boundingRect() ); 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. // first we need to draw all queued shadows.
drawQueuedShadows( w ); drawQueuedShadows( w );
} }
if( useShadow( w )) if( useShadow( w ) && !data.quads.isTransformed())
{ {
if( !optimize ) if( !optimize )
{ {

View file

@ -741,6 +741,14 @@ bool WindowQuadList::smoothNeeded() const
return false; return false;
} }
bool WindowQuadList::isTransformed() const
{
foreach( WindowQuad q, *this )
if( q.isTransformed())
return true;
return false;
}
/*************************************************************** /***************************************************************
PaintClipper PaintClipper
***************************************************************/ ***************************************************************/

View file

@ -831,6 +831,7 @@ class KWIN_EXPORT WindowQuadList
WindowQuadList filterOut( WindowQuadType type ) const; WindowQuadList filterOut( WindowQuadType type ) const;
bool smoothNeeded() const; bool smoothNeeded() const;
void makeArrays( float** vertices, float** texcoords ) const; void makeArrays( float** vertices, float** texcoords ) const;
bool isTransformed() const;
}; };
class KWIN_EXPORT WindowPrePaintData class KWIN_EXPORT WindowPrePaintData