From 48a8d6ada000c195ae9da4b7d5a7b305a98c3c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 2 Mar 2004 17:28:37 +0000 Subject: [PATCH] Fix #74971 - never lower windows because their raise was refused by focus stealing prevention. CCMAIL: 74971-done@bugs.kde.org svn path=/trunk/kdebase/kwin/; revision=293152 --- layers.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/layers.cpp b/layers.cpp index f8d2d3e14f..71e3aef77b 100644 --- a/layers.cpp +++ b/layers.cpp @@ -350,29 +350,21 @@ void Workspace::raiseClientWithinApplication( Client* c ) StackingUpdatesBlocker blocker( this ); // ignore mainwindows - bool raised = false; - bool is_above_active = false; - bool was_active = false; // first try to put it above the top-most window of the application for( ClientList::Iterator it = unconstrained_stacking_order.fromLast(); it != unconstrained_stacking_order.end(); --it ) { - if( (*it)->isActive()) - was_active = true; - if( Client::belongToSameApplication( *it, c ) && (*it) != c ) + if( *it == c ) // don't lower it just because it asked to be raised + return; + if( Client::belongToSameApplication( *it, c )) { unconstrained_stacking_order.remove( c ); ++it; // insert after the found one unconstrained_stacking_order.insert( it, c ); - raised = true; - break; + return; } - if( *it == c && !was_active ) // if it is already above the active one for some reason, - is_above_active = true; // don't put it lower just because it asked to be raised } - if( !raised && !is_above_active ) - restackClientUnderActive( c ); } void Workspace::raiseClientRequest( Client* c )