Support in scene painting code for drawing also hidden windows.

svn path=/branches/work/kwin_composite/; revision=621337
This commit is contained in:
Luboš Luňák 2007-01-08 17:05:58 +00:00
parent 579f174e63
commit 92652a187d
3 changed files with 14 additions and 10 deletions

View file

@ -218,10 +218,7 @@ void Workspace::performCompositing()
++i )
{
if( Client* c = findClient( FrameIdMatchPredicate( children[ i ] )))
{
if( c->isShown( true ) && c->isOnCurrentDesktop())
windows.append( c );
}
windows.append( c );
else if( Unmanaged* c = findUnmanaged( HandleMatchPredicate( children[ i ] )))
windows.append( c );
}

View file

@ -155,12 +155,14 @@ void Scene::paintGenericScreen( int orig_mask, ScreenPaintData )
paintBackground( infiniteRegion());
foreach( Window* w, stacking_order ) // bottom to top
{
if( !w->isVisible())
continue;
int mask = orig_mask | ( w->isOpaque() ? PAINT_WINDOW_OPAQUE : PAINT_WINDOW_TRANSLUCENT );
if( !w->isVisible())
mask |= PAINT_WINDOW_DISABLED;
QRegion damage = infiniteRegion();
// preparation step
effects->prePaintWindow( w, &mask, &damage, time_diff );
if( mask & PAINT_WINDOW_DISABLED )
continue;
paintWindow( w, mask, damage );
}
}
@ -182,14 +184,16 @@ void Scene::paintSimpleScreen( int orig_mask, QRegion region )
--i )
{
Window* w = stacking_order[ i ];
if( !w->isVisible())
continue;
if( region.isEmpty()) // completely clipped
continue;
int mask = orig_mask | ( w->isOpaque() ? PAINT_WINDOW_OPAQUE : PAINT_WINDOW_TRANSLUCENT );
if( !w->isVisible())
mask |= PAINT_WINDOW_DISABLED;
QRegion damage = region;
// preparation step
effects->prePaintWindow( w, &mask, &damage, time_diff );
if( mask & PAINT_WINDOW_DISABLED )
continue;
// If the window is transparent, the transparent part will be done
// in the 2nd pass.
if( mask & PAINT_WINDOW_TRANSLUCENT )

View file

@ -54,11 +54,14 @@ class Scene
PAINT_WINDOW_TRANSLUCENT = 1 << 1,
// Window will be painted with transformed geometry.
PAINT_WINDOW_TRANSFORMED = 1 << 2,
// When set, the window won't be painted (set by default
// for hidden windows, can be unset in pre-paint).
PAINT_WINDOW_DISABLED = 1 << 3,
// Paint only a region of the screen (can be optimized, cannot
// be used together with TRANSFORMED flags).
PAINT_SCREEN_REGION = 1 << 3,
PAINT_SCREEN_REGION = 1 << 4,
// Whole screen will be painted with transformed geometry.
PAINT_SCREEN_TRANSFORMED = 1 << 4
PAINT_SCREEN_TRANSFORMED = 1 << 5,
};
// there's nothing to paint (adjust time_diff later)
void idle();