From fe0ab6d20094f931a0712e8036b63ce54c9c7a27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 24 Nov 2003 14:24:04 +0000 Subject: [PATCH] Avoid making windows transient to themselves. Don't worry about creating loops with group transients, checkGroupTransients() will check for them and has better chances to break them correctly. svn path=/trunk/kdebase/kwin/; revision=269292 --- group.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/group.cpp b/group.cpp index 53edde73ea..a11aa0d2ce 100644 --- a/group.cpp +++ b/group.cpp @@ -340,7 +340,7 @@ void Client::setTransient( Window new_transient_for_id ) for( ClientList::ConstIterator it = group()->members().begin(); it != group()->members().end(); ++it ) - if( !(*it)->groupTransient()) + if( *it != this ) (*it)->addTransient( this ); } else if( transient_for_id != None ) @@ -714,6 +714,8 @@ void Client::checkGroup() { if( !(*it)->groupTransient()) // and its transient for group transients in the new group continue; + if( *it == this ) + continue; addTransient( *it ); } checkGroupTransients();