Damage screen when stacking order changes.
svn path=/branches/work/kwin_composite/; revision=627103
This commit is contained in:
parent
65d5eaf9b8
commit
29b8d42e55
1 changed files with 40 additions and 65 deletions
57
layers.cpp
57
layers.cpp
|
@ -119,8 +119,7 @@ void Workspace::updateStackingOrder( bool propagate_new_clients )
|
||||||
if( changed || propagate_new_clients )
|
if( changed || propagate_new_clients )
|
||||||
{
|
{
|
||||||
propagateClients( propagate_new_clients );
|
propagateClients( propagate_new_clients );
|
||||||
if( active_client )
|
addDamageFull();
|
||||||
active_client->updateMouseGrab();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,25 +191,23 @@ void Workspace::propagateClients( bool propagate_new_clients )
|
||||||
doesn't accept focus it's excluded.
|
doesn't accept focus it's excluded.
|
||||||
*/
|
*/
|
||||||
// TODO misleading name for this method
|
// TODO misleading name for this method
|
||||||
Client* Workspace::topClientOnDesktop( int desktop, bool unconstrained, bool only_normal ) const
|
Client* Workspace::topClientOnDesktop( int desktop, bool unconstrained ) const
|
||||||
{
|
{
|
||||||
// TODO Q_ASSERT( block_stacking_updates == 0 );
|
// TODO Q_ASSERT( block_stacking_updates == 0 );
|
||||||
ClientList list;
|
ClientList list;
|
||||||
if( !unconstrained )
|
if( !unconstrained )
|
||||||
|
{
|
||||||
list = stacking_order;
|
list = stacking_order;
|
||||||
else
|
|
||||||
list = unconstrained_stacking_order;
|
|
||||||
for( int i = list.size() - 1;
|
|
||||||
i >= 0;
|
|
||||||
--i )
|
|
||||||
{
|
|
||||||
if( list.at( i )->isOnDesktop( desktop ) && list.at( i )->isShown( false ))
|
|
||||||
{
|
|
||||||
if( !only_normal )
|
|
||||||
return list.at( i );
|
|
||||||
if( list.at( i )->wantsTabFocus() && !list.at( i )->isSpecialWindow())
|
|
||||||
return list.at( i );
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
list = unconstrained_stacking_order;
|
||||||
|
}
|
||||||
|
for ( int i = list.size() - 1; i>=0; i-- )
|
||||||
|
{
|
||||||
|
if ( list.at( i )->isOnDesktop( desktop ) && !list.at( i )->isSpecialWindow()
|
||||||
|
&& list.at( i )->isShown( false ) && list.at( i )->wantsTabFocus())
|
||||||
|
return list.at( i );
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -401,14 +398,8 @@ void Workspace::restackClientUnderActive( Client* c )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// put in the stacking order below _all_ windows belonging to the active application
|
||||||
assert( unconstrained_stacking_order.contains( active_client ));
|
assert( unconstrained_stacking_order.contains( active_client ));
|
||||||
if( Client::belongToSameApplication( active_client, c ))
|
|
||||||
{ // put it below the active window if it's the same app
|
|
||||||
unconstrained_stacking_order.removeAll( c );
|
|
||||||
unconstrained_stacking_order.insert( unconstrained_stacking_order.find( active_client ), c );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{ // put in the stacking order below _all_ windows belonging to the active application
|
|
||||||
for( ClientList::Iterator it = unconstrained_stacking_order.begin();
|
for( ClientList::Iterator it = unconstrained_stacking_order.begin();
|
||||||
it != unconstrained_stacking_order.end();
|
it != unconstrained_stacking_order.end();
|
||||||
++it )
|
++it )
|
||||||
|
@ -423,7 +414,6 @@ void Workspace::restackClientUnderActive( Client* c )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
assert( unconstrained_stacking_order.contains( c ));
|
assert( unconstrained_stacking_order.contains( c ));
|
||||||
for( int desktop = 1;
|
for( int desktop = 1;
|
||||||
desktop <= numberOfDesktops();
|
desktop <= numberOfDesktops();
|
||||||
|
@ -431,19 +421,13 @@ void Workspace::restackClientUnderActive( Client* c )
|
||||||
{ // do for every virtual desktop to handle the case of onalldesktop windows
|
{ // do for every virtual desktop to handle the case of onalldesktop windows
|
||||||
if( c->wantsTabFocus() && c->isOnDesktop( desktop ) && focus_chain[ desktop ].contains( active_client ))
|
if( c->wantsTabFocus() && c->isOnDesktop( desktop ) && focus_chain[ desktop ].contains( active_client ))
|
||||||
{
|
{
|
||||||
if( Client::belongToSameApplication( active_client, c ))
|
// also put in focus_chain[currentDesktop()] after all windows belonging to the active applicationa
|
||||||
{ // put it after the active window if it's the same app
|
|
||||||
focus_chain[ desktop ].removeAll( c );
|
focus_chain[ desktop ].removeAll( c );
|
||||||
focus_chain[ desktop ].insert( focus_chain[ desktop ].find( active_client ), c );
|
for ( int i = focus_chain[ desktop ].size() - 1;
|
||||||
}
|
|
||||||
else
|
|
||||||
{ // put it in focus_chain[currentDesktop()] after all windows belonging to the active applicationa
|
|
||||||
focus_chain[ desktop ].removeAll( c );
|
|
||||||
for( int i = focus_chain[ desktop ].size() - 1;
|
|
||||||
i >= 0;
|
i >= 0;
|
||||||
--i )
|
--i )
|
||||||
{
|
{
|
||||||
if( Client::belongToSameApplication( active_client, focus_chain[ desktop ].at( i )))
|
if( Client::belongToSameApplication( active_client, focus_chain[ desktop ].at( i ) ))
|
||||||
{
|
{
|
||||||
focus_chain[ desktop ].insert( i, c );
|
focus_chain[ desktop ].insert( i, c );
|
||||||
break;
|
break;
|
||||||
|
@ -451,16 +435,8 @@ void Workspace::restackClientUnderActive( Client* c )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// the same for global_focus_chain
|
// the same for global_focus_chain
|
||||||
if( c->wantsTabFocus() && global_focus_chain.contains( active_client ))
|
if( c->wantsTabFocus() && global_focus_chain.contains( active_client ))
|
||||||
{
|
|
||||||
if( Client::belongToSameApplication( active_client, c ))
|
|
||||||
{
|
|
||||||
global_focus_chain.removeAll( c );
|
|
||||||
global_focus_chain.insert( global_focus_chain.find( active_client ), c );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
global_focus_chain.removeAll( c );
|
global_focus_chain.removeAll( c );
|
||||||
for ( int i = global_focus_chain.size() - 1;
|
for ( int i = global_focus_chain.size() - 1;
|
||||||
|
@ -474,7 +450,6 @@ void Workspace::restackClientUnderActive( Client* c )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
updateStackingOrder();
|
updateStackingOrder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue