From 7eff49ed22aeeb2c3ed56671e4520453ecef772e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 20 Feb 2005 23:06:11 +0000 Subject: [PATCH] BUGS:99836 better opacity handling of modal windows and their transientFor()s svn path=/trunk/kdebase/kwin/; revision=391550 --- activation.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/activation.cpp b/activation.cpp index 2330bdd933..e294ff4108 100644 --- a/activation.cpp +++ b/activation.cpp @@ -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 )