Merging from old trunk:

r603033 | lunakl | 2006-11-07 17:19:39 +0100 (Tue, 07 Nov 2006) | 3 lines

Keep stacking order and focus chain order e.g. after doing "kwin --replace".


svn path=/trunk/KDE/kdebase/workspace/; revision=659303
icc-effect-5.14.5
Luboš Luňák 2007-04-29 22:33:55 +00:00
parent 87daa082be
commit 2e39d12ff6
2 changed files with 24 additions and 6 deletions

View File

@ -673,7 +673,13 @@ void Workspace::updateFocusChains( Client* c, FocusChainChange change )
focus_chain[ i ].prepend( c );
}
else if( !focus_chain[ i ].contains( c ))
focus_chain[ i ].prepend( c ); // otherwise add as the last one
{ // add it after the active one
if( active_client != NULL && active_client != c
&& !focus_chain[ i ].isEmpty() && focus_chain[ i ].last() == active_client )
focus_chain[ i ].insert( focus_chain[ i ].size() - 1, c );
else
focus_chain[ i ].append( c ); // otherwise add as the first one
}
}
}
else //now only on desktop, remove it anywhere else
@ -693,7 +699,13 @@ void Workspace::updateFocusChains( Client* c, FocusChainChange change )
focus_chain[ i ].prepend( c );
}
else if( !focus_chain[ i ].contains( c ))
focus_chain[ i ].prepend( c );
{ // add it after the active one
if( active_client != NULL && active_client != c
&& !focus_chain[ i ].isEmpty() && focus_chain[ i ].last() == active_client )
focus_chain[ i ].insert( focus_chain[ i ].size() - 1, c );
else
focus_chain[ i ].append( c ); // otherwise add as the first one
}
}
else
focus_chain[ i ].removeAll( c );
@ -710,7 +722,13 @@ void Workspace::updateFocusChains( Client* c, FocusChainChange change )
global_focus_chain.prepend( c );
}
else if( !global_focus_chain.contains( c ))
global_focus_chain.prepend( c );
{ // add it after the active one
if( active_client != NULL && active_client != c
&& !global_focus_chain.isEmpty() && global_focus_chain.last() == active_client )
global_focus_chain.insert( global_focus_chain.size() - 1, c );
else
global_focus_chain.append( c ); // otherwise add as the first one
}
}
void Workspace::updateCurrentTopMenu()

View File

@ -582,9 +582,9 @@ class Workspace : public QObject, public KDecorationDefines
UnmanagedList unmanaged;
DeletedList deleted;
ClientList unconstrained_stacking_order;
ClientList stacking_order;
QVector< ClientList > focus_chain;
ClientList unconstrained_stacking_order; // topmost last
ClientList stacking_order; // topmost last
QVector< ClientList > focus_chain; // currently ative last
ClientList global_focus_chain; // this one is only for things like tabbox's MRU
ClientList should_get_focus; // last is most recent
ClientList attention_chain;