From 2c0df531b7736b5c0f9540b99b27d4f01191e9fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 4 Mar 2016 15:38:51 +0100 Subject: [PATCH] Only pass key press events to TabBox We want TabBox to operate on key press, not on key release. So far it only operated on release as the press was filtered out by the global shortcuts filter. To prevent that the tab box filter is moved before the global shortcuts filter. Note: first usage of TabBox has current window selected instead of next. This problem is also visible on X11. --- input.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/input.cpp b/input.cpp index c78c741203..ed2439aca2 100644 --- a/input.cpp +++ b/input.cpp @@ -492,7 +492,8 @@ public: if (!TabBox::TabBox::self() || !TabBox::TabBox::self()->isGrabbed()) { return false; } - TabBox::TabBox::self()->keyPress(event->modifiers() | event->key()); + if (event->type() == QEvent::KeyPress) + TabBox::TabBox::self()->keyPress(event->modifiers() | event->key()); return true; } bool wheelEvent(QWheelEvent *event) override { @@ -868,10 +869,10 @@ void InputRedirection::setupInputFilters() installInputEventFilter(new ScreenEdgeInputFilter); installInputEventFilter(new EffectsFilter); installInputEventFilter(new MoveResizeFilter); - installInputEventFilter(new GlobalShortcutFilter); #ifdef KWIN_BUILD_TABBOX installInputEventFilter(new TabBoxInputFilter); #endif + installInputEventFilter(new GlobalShortcutFilter); installInputEventFilter(new InternalWindowEventFilter); installInputEventFilter(new DecorationEventFilter); if (waylandServer()) {