From 09ba49e401351ab8dacfe263b2aa52c85bd65b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 10 Aug 2016 14:19:12 +0200 Subject: [PATCH] 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 --- shell_client.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shell_client.cpp b/shell_client.cpp index a6c43a14a6..2f3ca217be 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -789,6 +789,9 @@ void ShellClient::takeFocus() void ShellClient::doSetActive() { + if (!isActive()) { + return; + } StackingUpdatesBlocker blocker(workspace()); workspace()->focusToNull(); }