From 75455b98ae7ac79354a3ea0355169ceb01b4c634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Fri, 28 Jan 2005 16:35:34 +0000 Subject: [PATCH] If a window is raised above some other window in the same window group which is in a higher layer, make sure it stays above that window. BUG: 95731 svn path=/trunk/kdebase/kwin/; revision=383308 --- layers.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/layers.cpp b/layers.cpp index 7bbaac1558..b993f4540a 100644 --- a/layers.cpp +++ b/layers.cpp @@ -476,14 +476,22 @@ ClientList Workspace::constrainedStackingOrder() kdDebug() << "stacking1:" << endl; #endif // build the order from layers + QMap< Group*, Layer > minimum_layer; for( ClientList::ConstIterator it = unconstrained_stacking_order.begin(); it != unconstrained_stacking_order.end(); ++it ) { -#if 0 - kdDebug() << (void*)(*it) << *it << endl; -#endif - layer[ (*it)->layer() ].append( *it ); + Layer l = (*it)->layer(); + // If a window is raised above some other window in the same window group + // which is in a higher layer, make sure it stays above that window (see #95731). + if(( l == NormalLayer || l == AboveLayer ) + && minimum_layer.contains( (*it)->group()) + && l < minimum_layer[ (*it)->group() ] ) + { + l = minimum_layer[ (*it)->group() ]; + } + minimum_layer[ (*it)->group() ] = l; + layer[ l ].append( *it ); } ClientList stacking; for( Layer lay = FirstLayer;