BUGS:99836

better opacity handling of modal windows and their transientFor()s

svn path=/trunk/kdebase/kwin/; revision=391550
This commit is contained in:
Thomas Lübking 2005-02-20 23:06:11 +00:00
parent 9e6ae5b095
commit 7eff49ed22

View file

@ -221,7 +221,7 @@ void Workspace::setActiveClient( Client* c, allowed_t )
++set_active_client_recursion;
if( active_client != NULL )
{ // note that this may call setActiveClient( NULL ), therefore the recursion counter
active_client->setActive( false, !c || !c->isModal() );
active_client->setActive( false, !c || !c->isModal() || c != active_client->transientFor() );
}
active_client = c;
Q_ASSERT( c == NULL || c->isActive());
@ -779,6 +779,11 @@ void Client::setActive( bool act, bool updateOpacity_)
workspace()->setActiveClient( act ? this : NULL, Allowed );
if (updateOpacity_) updateOpacity();
if (isModal() && transientFor())
{
if (!act) transientFor()->updateOpacity();
else if (!transientFor()->custom_opacity) transientFor()->setOpacity(options->translucentActiveWindows, options->activeWindowOpacity);
}
updateShadowSize();
if ( active )