diff --git a/effects.cpp b/effects.cpp index 9c22c2970d..bae4d44236 100644 --- a/effects.cpp +++ b/effects.cpp @@ -47,6 +47,10 @@ void Effect::windowUserMovedResized( EffectWindow* , bool, bool ) { } +void Effect::windowOpacityChanged( EffectWindow* ) + { + } + void Effect::windowAdded( EffectWindow* ) { } @@ -162,6 +166,12 @@ void EffectsHandler::windowUserMovedResized( EffectWindow* c, bool first, bool l ep.second->windowUserMovedResized( c, first, last ); } +void EffectsHandler::windowOpacityChanged( EffectWindow* c ) + { + foreach( EffectPair ep, loaded_effects ) + ep.second->windowOpacityChanged( c ); + } + void EffectsHandler::windowAdded( EffectWindow* c ) { foreach( EffectPair ep, loaded_effects ) diff --git a/effects.h b/effects.h index f18396690d..57b54ce7f3 100644 --- a/effects.h +++ b/effects.h @@ -73,6 +73,7 @@ class Effect virtual void postPaintWindow( EffectWindow* w ); // called when moved/resized or once after it's finished virtual void windowUserMovedResized( EffectWindow* c, bool first, bool last ); + virtual void windowOpacityChanged( EffectWindow* c ); virtual void windowAdded( EffectWindow* c ); virtual void windowClosed( EffectWindow* c ); virtual void windowDeleted( EffectWindow* c ); @@ -137,6 +138,7 @@ class EffectsHandler // internal (used by kwin core or compositing code) void startPaint(); void windowUserMovedResized( EffectWindow* c, bool first, bool last ); + void windowOpacityChanged( EffectWindow* c ); void windowAdded( EffectWindow* c ); void windowClosed( EffectWindow* c ); void windowDeleted( EffectWindow* c ); diff --git a/events.cpp b/events.cpp index 5c71f64198..40944081e4 100644 --- a/events.cpp +++ b/events.cpp @@ -597,6 +597,8 @@ bool Client::windowEvent( XEvent* e ) { addDamageFull(); scene->windowOpacityChanged( this ); + if( effects ) + effects->windowOpacityChanged( effectWindow()); } else { // forward to the frame if there's possibly another compositing manager running @@ -1606,6 +1608,8 @@ bool Unmanaged::windowEvent( XEvent* e ) if( dirty[ NETWinInfo::PROTOCOLS2 ] & NET::WM2Opacity ) { scene->windowOpacityChanged( this ); + if( effects ) + effects->windowOpacityChanged( effectWindow()); addDamageFull(); } switch (e->type)