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
This commit is contained in:
parent
aa8f2d6607
commit
48a8d6ada0
1 changed files with 4 additions and 12 deletions
16
layers.cpp
16
layers.cpp
|
@ -350,29 +350,21 @@ void Workspace::raiseClientWithinApplication( Client* c )
|
||||||
StackingUpdatesBlocker blocker( this );
|
StackingUpdatesBlocker blocker( this );
|
||||||
// ignore mainwindows
|
// 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
|
// first try to put it above the top-most window of the application
|
||||||
for( ClientList::Iterator it = unconstrained_stacking_order.fromLast();
|
for( ClientList::Iterator it = unconstrained_stacking_order.fromLast();
|
||||||
it != unconstrained_stacking_order.end();
|
it != unconstrained_stacking_order.end();
|
||||||
--it )
|
--it )
|
||||||
{
|
{
|
||||||
if( (*it)->isActive())
|
if( *it == c ) // don't lower it just because it asked to be raised
|
||||||
was_active = true;
|
return;
|
||||||
if( Client::belongToSameApplication( *it, c ) && (*it) != c )
|
if( Client::belongToSameApplication( *it, c ))
|
||||||
{
|
{
|
||||||
unconstrained_stacking_order.remove( c );
|
unconstrained_stacking_order.remove( c );
|
||||||
++it; // insert after the found one
|
++it; // insert after the found one
|
||||||
unconstrained_stacking_order.insert( it, c );
|
unconstrained_stacking_order.insert( it, c );
|
||||||
raised = true;
|
return;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
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 )
|
void Workspace::raiseClientRequest( Client* c )
|
||||||
|
|
Loading…
Reference in a new issue