Only focusToNull when activating a ShellClient

ShellClient::doSetActive calls into focusToNull to deactivate active
windows on X11. But this should only be done when activating a
ShellClient. When deactivating a ShellClient the focusToNull can
result in an activated X-client to lose activation.

Thus this change ensures that focusToNull is only performed for a
now active ShellClient.

Reviewed-By: bshah
icc-effect-5.14.5
Martin Gräßlin 2016-08-10 14:19:12 +02:00
parent dad7004dbb
commit 09ba49e401
1 changed files with 3 additions and 0 deletions

View File

@ -789,6 +789,9 @@ void ShellClient::takeFocus()
void ShellClient::doSetActive()
{
if (!isActive()) {
return;
}
StackingUpdatesBlocker blocker(workspace());
workspace()->focusToNull();
}