diff --git a/composite.cpp b/composite.cpp index 9949af4067..f4ed523740 100644 --- a/composite.cpp +++ b/composite.cpp @@ -301,10 +301,11 @@ void Workspace::performCompositing() windows.append( c ); foreach( Deleted* c, deleted ) // TODO remember stacking order somehow windows.append( c ); - foreach( Toplevel* c, static_cast< EffectsHandlerImpl* >( effects )->elevatedWindows()) + foreach( EffectWindow* c, static_cast< EffectsHandlerImpl* >( effects )->elevatedWindows()) { - windows.removeAll( c ); - windows.append( c ); + Toplevel* t = static_cast< EffectWindowImpl* >( c )->window(); + windows.removeAll( t ); + windows.append( t ); } foreach( Toplevel* c, windows ) { // This could be possibly optimized WRT obscuring, but that'd need being already diff --git a/effects.cpp b/effects.cpp index a83578451e..1c524f8851 100644 --- a/effects.cpp +++ b/effects.cpp @@ -203,7 +203,7 @@ void EffectsHandlerImpl::windowDeleted( EffectWindow* c ) foreach( EffectPair ep, loaded_effects ) ep.second->windowDeleted( c ); Toplevel* c2 = static_cast< EffectWindowImpl* >( c )->window(); - elevated_windows.removeAll( c2 ); + elevated_windows.removeAll( c ); } void EffectsHandlerImpl::windowClosed( EffectWindow* c ) @@ -450,10 +450,9 @@ EffectWindowList EffectsHandlerImpl::stackingOrder() const void EffectsHandlerImpl::setElevatedWindow( EffectWindow* w, bool set ) { - Toplevel* c = static_cast< EffectWindowImpl* >( w )->window(); - elevated_windows.removeAll( c ); + elevated_windows.removeAll( w ); if( set ) - elevated_windows.append( c ); + elevated_windows.append( w ); } void EffectsHandlerImpl::setTabBoxWindow(EffectWindow* w) diff --git a/effects.h b/effects.h index 117ae04ab0..8a31fc401e 100644 --- a/effects.h +++ b/effects.h @@ -142,7 +142,7 @@ class EffectsHandlerImpl : public EffectsHandler void reloadEffect( const QString& name ); bool isEffectLoaded( const QString& name ); - ToplevelList elevatedWindows() const; + QList elevatedWindows() const; protected: KLibrary* findEffectLibrary( KService* service ); @@ -151,7 +151,7 @@ class EffectsHandlerImpl : public EffectsHandler Effect* keyboard_grab_effect; QStack render_targets; Effect* fullscreen_effect; - ToplevelList elevated_windows; + QList elevated_windows; QMultiMap< int, EffectPair > effect_order; QHash< long, int > registered_atoms; }; @@ -248,7 +248,7 @@ class EffectWindowGroupImpl inline -ToplevelList EffectsHandlerImpl::elevatedWindows() const +QList EffectsHandlerImpl::elevatedWindows() const { return elevated_windows; }