Ignore FocusIn events for clients which were unmapped by kwin
but had got focus shortly before. Otherwise quick switching between two virtual desktops with Konsoles can result in demand attention state. svn path=/trunk/kdebase/kwin/; revision=295169
This commit is contained in:
parent
8a9738e02f
commit
a6adcb9056
2 changed files with 3 additions and 0 deletions
|
@ -403,6 +403,7 @@ void Workspace::gotFocusIn( const Client* c )
|
|||
// but didn't for some reason (and also won't anymore, because they were sooner)
|
||||
while( should_get_focus.first() != c )
|
||||
should_get_focus.pop_front();
|
||||
should_get_focus.pop_front(); // remove 'c'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1309,6 +1309,8 @@ void Client::focusInEvent( XFocusInEvent* e )
|
|||
return; // we don't care
|
||||
if ( e->detail == NotifyPointer )
|
||||
return; // we don't care
|
||||
if( !isShown( false ) || !isOnCurrentDesktop()) // we unmapped it, but it got focus meanwhile ->
|
||||
return; // activateNextClient() already transferred focus elsewhere
|
||||
// check if this client is in should_get_focus list or if activation is allowed
|
||||
bool activate = workspace()->allowClientActivation( this, -1U, true );
|
||||
workspace()->gotFocusIn( this ); // remove from should_get_focus list
|
||||
|
|
Loading…
Reference in a new issue