From da4305c2fa308cb7e41184cef5b63990e7289588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 7 Jul 2015 16:15:58 +0200 Subject: [PATCH] [wayland] Focus to null X11 window when activating a Wayland client Improves interaction with Xwayland clients. --- shell_client.cpp | 6 ++++++ shell_client.h | 1 + 2 files changed, 7 insertions(+) diff --git a/shell_client.cpp b/shell_client.cpp index b9cc075820..2ff3eaa660 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -439,6 +439,12 @@ void ShellClient::takeFocus() workspace()->setShowingDesktop(false); } +void ShellClient::doSetActive() +{ + StackingUpdatesBlocker blocker(workspace()); + workspace()->focusToNull(); +} + void ShellClient::updateWindowRules(Rules::Types selection) { Q_UNUSED(selection) diff --git a/shell_client.h b/shell_client.h index a58b1eb440..3ef084bb59 100644 --- a/shell_client.h +++ b/shell_client.h @@ -113,6 +113,7 @@ public: protected: void addDamage(const QRegion &damage) override; bool belongsToSameApplication(const AbstractClient *other, bool active_hack) const override; + void doSetActive() override; private Q_SLOTS: void clientFullScreenChanged(bool fullScreen);