Merging from old trunk:

r630817 | lunakl | 2007-02-06 14:55:12 +0100 (Tue, 06 Feb 2007) | 4 lines

Don't accidentally set _NET_ACTIVE_WINDOW to 0 when there is an active window.
And r612728 from 3.5 branch.


svn path=/trunk/KDE/kdebase/workspace/; revision=659533
This commit is contained in:
Luboš Luňák 2007-04-30 11:46:54 +00:00
parent 79ab08b9e9
commit 0a26dc39aa
2 changed files with 7 additions and 3 deletions

View file

@ -222,8 +222,8 @@ void Workspace::setActiveClient( Client* c, allowed_t )
++set_active_client_recursion;
if( active_client != NULL )
{ // note that this may call setActiveClient( NULL ), therefore the recursion counter
active_client->setActive( false );
}
active_client->setActive( false );
}
active_client = c;
Q_ASSERT( c == NULL || c->isActive());
if( active_client != NULL )
@ -266,6 +266,7 @@ void Workspace::activateClient( Client* c, bool force )
{
if( c == NULL )
{
focusToNull();
setActiveClient( NULL, Allowed );
return;
}

View file

@ -1324,7 +1324,10 @@ bool Workspace::setCurrentDesktop( int new_desktop )
// and active_client is on_all_desktops and under mouse (hence == old_active_client),
// conserve focus (thanks to Volker Schatz <V.Schatz at thphys.uni-heidelberg.de>)
else if( active_client && active_client->isShown( true ) && active_client->isOnCurrentDesktop())
c= active_client;
c = active_client;
if( c == NULL && !desktops.isEmpty())
c = findDesktop( true, currentDesktop());
if( c != active_client )
setActiveClient( NULL, Allowed );