diff --git a/activation.cpp b/activation.cpp index a1eddf6dd9..b3216cbf43 100644 --- a/activation.cpp +++ b/activation.cpp @@ -861,6 +861,8 @@ void Client::setActive( bool act ) if ( active == act ) return; active = act; + const int ruledOpacity = active ? rules()->checkOpacityActive(opacity()*100) : rules()->checkOpacityInactive(opacity()*100); + setOpacity( ruledOpacity/100.0 ); workspace()->setActiveClient( act ? this : NULL, Allowed ); if ( active ) diff --git a/effects.cpp b/effects.cpp index 65a39b730d..9b5653df90 100644 --- a/effects.cpp +++ b/effects.cpp @@ -210,6 +210,8 @@ void EffectsHandlerImpl::windowUserMovedResized( EffectWindow* c, bool first, bo void EffectsHandlerImpl::windowOpacityChanged( EffectWindow* c, double old_opacity ) { + if (!c) + return; if( static_cast(c)->window()->opacity() == old_opacity ) return; foreach( const EffectPair &ep, loaded_effects ) diff --git a/rules.cpp b/rules.cpp index d34ec8eec5..b79bd1ab07 100644 --- a/rules.cpp +++ b/rules.cpp @@ -853,7 +853,12 @@ void Client::applyWindowRules() setShortcut( rules()->checkShortcut( shortcut().toString())); // see also Client::setActive() if( isActive()) + { + setOpacity( rules()->checkOpacityActive(opacity()*100)/100.0 ); workspace()->disableGlobalShortcutsForClient( rules()->checkDisableGlobalShortcuts( false )); + } + else + setOpacity( rules()->checkOpacityInactive(opacity()*100)/100.0 ); } void Client::updateWindowRules()