From f7925c586ef3426bc0f236aa4209d3bd94532e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 24 Aug 2015 11:44:05 +0200 Subject: [PATCH] [tabbox] Support wayland in establish/remove TabBoxGrab We cannot grab keyboard/mouse through X means, so don't even try, but mark as grabbed. With this change the TabBox shows on Wayland. --- tabbox/tabbox.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tabbox/tabbox.cpp b/tabbox/tabbox.cpp index cd1b4a657b..b6f7beccaf 100644 --- a/tabbox/tabbox.cpp +++ b/tabbox/tabbox.cpp @@ -1613,6 +1613,10 @@ Client* TabBox::previousClientStatic(Client* c) const bool TabBox::establishTabBoxGrab() { + if (kwinApp()->shouldUseWaylandForCompositing()) { + m_forcedGlobalMouseGrab = true; + return true; + } updateXTime(); if (!grabXKeyboard()) return false; @@ -1630,6 +1634,10 @@ bool TabBox::establishTabBoxGrab() void TabBox::removeTabBoxGrab() { + if (kwinApp()->shouldUseWaylandForCompositing()) { + m_forcedGlobalMouseGrab = false; + return; + } updateXTime(); ungrabXKeyboard(); assert(m_forcedGlobalMouseGrab);