diff --git a/composite.cpp b/composite.cpp index 8159816928..c3c9a95a8f 100644 --- a/composite.cpp +++ b/composite.cpp @@ -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 ); } diff --git a/scene.cpp b/scene.cpp index bdbfe37b0a..ef6fe7620f 100644 --- a/scene.cpp +++ b/scene.cpp @@ -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 ) diff --git a/scene.h b/scene.h index 558c308cb0..3ae7077dc8 100644 --- a/scene.h +++ b/scene.h @@ -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();