BUG: 167138
make opacity rules actually functional svn path=/trunk/KDE/kdebase/workspace/; revision=1002997
This commit is contained in:
parent
ffa58ea60d
commit
46def0304e
3 changed files with 9 additions and 0 deletions
|
@ -861,6 +861,8 @@ void Client::setActive( bool act )
|
||||||
if ( active == act )
|
if ( active == act )
|
||||||
return;
|
return;
|
||||||
active = act;
|
active = act;
|
||||||
|
const int ruledOpacity = active ? rules()->checkOpacityActive(opacity()*100) : rules()->checkOpacityInactive(opacity()*100);
|
||||||
|
setOpacity( ruledOpacity/100.0 );
|
||||||
workspace()->setActiveClient( act ? this : NULL, Allowed );
|
workspace()->setActiveClient( act ? this : NULL, Allowed );
|
||||||
|
|
||||||
if ( active )
|
if ( active )
|
||||||
|
|
|
@ -210,6 +210,8 @@ void EffectsHandlerImpl::windowUserMovedResized( EffectWindow* c, bool first, bo
|
||||||
|
|
||||||
void EffectsHandlerImpl::windowOpacityChanged( EffectWindow* c, double old_opacity )
|
void EffectsHandlerImpl::windowOpacityChanged( EffectWindow* c, double old_opacity )
|
||||||
{
|
{
|
||||||
|
if (!c)
|
||||||
|
return;
|
||||||
if( static_cast<EffectWindowImpl*>(c)->window()->opacity() == old_opacity )
|
if( static_cast<EffectWindowImpl*>(c)->window()->opacity() == old_opacity )
|
||||||
return;
|
return;
|
||||||
foreach( const EffectPair &ep, loaded_effects )
|
foreach( const EffectPair &ep, loaded_effects )
|
||||||
|
|
|
@ -853,7 +853,12 @@ void Client::applyWindowRules()
|
||||||
setShortcut( rules()->checkShortcut( shortcut().toString()));
|
setShortcut( rules()->checkShortcut( shortcut().toString()));
|
||||||
// see also Client::setActive()
|
// see also Client::setActive()
|
||||||
if( isActive())
|
if( isActive())
|
||||||
|
{
|
||||||
|
setOpacity( rules()->checkOpacityActive(opacity()*100)/100.0 );
|
||||||
workspace()->disableGlobalShortcutsForClient( rules()->checkDisableGlobalShortcuts( false ));
|
workspace()->disableGlobalShortcutsForClient( rules()->checkDisableGlobalShortcuts( false ));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
setOpacity( rules()->checkOpacityInactive(opacity()*100)/100.0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::updateWindowRules()
|
void Client::updateWindowRules()
|
||||||
|
|
Loading…
Reference in a new issue