From ecec648c1127e9ef41133b8ee13ab3f303f44df6 Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Fri, 12 Nov 1999 03:58:34 +0000 Subject: [PATCH] more robust raise algorithm svn path=/trunk/kdebase/kwin/; revision=33562 --- workspace.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/workspace.cpp b/workspace.cpp index 01d1d5ae51..fec7a99cb0 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -850,9 +850,19 @@ void Workspace::raiseClient( Client* c ) XRestackWindows(qt_xdisplay(), new_stack, i); delete [] new_stack; - if ( c->transientFor() ) - raiseClient( findClient( c->transientFor() ) ); - + if ( c->transientFor() ) { + Client* t = findClient( c->transientFor() ); + Client* t2; + while (t && t->transientFor() ) { + t2 = findClient( t->transientFor() ); + if ( t2 == c ) + goto end; + t = t2; + } + raiseClient( t ); + } + + end: propagateClients( TRUE ); }