Fill empty spaces in multi screen setup with cube cap color if caps are used.

FEATURE: 169371

svn path=/trunk/KDE/kdebase/workspace/; revision=922024
remotes/origin/Plasma/5.0
Martin Gräßlin 17 years ago
parent a16aba4b05
commit b81bf26c77
  1. 30
      effects/cube/cube.cpp

@ -1326,6 +1326,36 @@ void CubeEffect::paintWindow( EffectWindow* w, int mask, QRegion region, WindowP
}
data.quads = new_quads;
}
if( w->isDesktop() && effects->numScreens() > 1 && paintCaps && !slide )
{
QRegion paint = QRegion( rect );
for( int i=0; i<effects->numScreens(); i++ )
{
if( i == w->screen() )
continue;
paint = paint.subtracted( QRegion( effects->clientArea( ScreenArea, i, painting_desktop )));
}
paint = paint.subtracted( QRegion( w->geometry()));
// in case of free area in multiscreen setup fill it with cap color
if( !paint.isEmpty() )
{
glColor4f( capColor.redF(), capColor.greenF(), capColor.blueF(), cubeOpacity );
glPushAttrib( GL_CURRENT_BIT | GL_ENABLE_BIT );
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
glBegin( GL_QUADS );
foreach( QRect paintRect, paint.rects() )
{
glVertex2f( paintRect.x(), paintRect.y() );
glVertex2f( paintRect.x()+paintRect.width(), paintRect.y() );
glVertex2f( paintRect.x()+paintRect.width(), paintRect.y() + paintRect.height() );
glVertex2f( paintRect.x(), paintRect.y() + paintRect.height() );
}
glEnd();
glDisable( GL_BLEND );
glPopAttrib();
}
}
}
effects->paintWindow( w, mask, region, data );
}

Loading…
Cancel
Save