Don't obscure windows that are not visible, otherwise switching between
two empty desktops can flicker. svn path=/trunk/kdebase/kwin/; revision=263247
This commit is contained in:
parent
240ad036d0
commit
323806acbe
1 changed files with 9 additions and 7 deletions
|
@ -935,23 +935,25 @@ bool Workspace::setCurrentDesktop( int new_desktop )
|
|||
|
||||
ObscuringWindows obs_wins;
|
||||
|
||||
int old_desktop = current_desktop;
|
||||
current_desktop = new_desktop; // change the desktop (so that Client::virtualDesktopChange() works)
|
||||
|
||||
for ( ClientList::ConstIterator it = stacking_order.begin(); it != stacking_order.end(); ++it)
|
||||
if ( !(*it)->isOnDesktop( new_desktop ) && (*it) != movingClient )
|
||||
{
|
||||
if( (*it)->isShown( true ) && (*it)->isOnDesktop( old_desktop ))
|
||||
obs_wins.create( *it );
|
||||
(*it)->virtualDesktopChange();
|
||||
}
|
||||
|
||||
rootInfo->setCurrentDesktop( current_desktop ); // now propagate the change, after hiding, before showing
|
||||
|
||||
if( movingClient && !movingClient->isOnDesktop( new_desktop ))
|
||||
movingClient->setDesktop( new_desktop );
|
||||
|
||||
for ( ClientList::ConstIterator it = stacking_order.fromLast(); it != stacking_order.end(); --it)
|
||||
if ( (*it)->isOnDesktop( new_desktop ) )
|
||||
(*it)->virtualDesktopChange();
|
||||
|
||||
if( movingClient && !movingClient->isOnDesktop( new_desktop ))
|
||||
movingClient->setDesktop( new_desktop );
|
||||
}
|
||||
|
||||
// restore the focus on this desktop
|
||||
|
|
Loading…
Reference in a new issue