From 1c3e0de31dbb19f74c17c72024b103a0642d0593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 26 Jul 2013 08:01:16 +0200 Subject: [PATCH] Stop keyboard event processing if effects have a grab --- events.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/events.cpp b/events.cpp index bdb9d65c8f..1ddc795c36 100644 --- a/events.cpp +++ b/events.cpp @@ -76,11 +76,12 @@ extern int currentRefreshRate(); */ bool Workspace::workspaceEvent(xcb_generic_event_t *e) { -#if KWIN_QT5_PORTING + const uint8_t eventType = e->response_type & ~0x80; if (effects && static_cast< EffectsHandlerImpl* >(effects)->hasKeyboardGrab() - && (e->type == KeyPress || e->type == KeyRelease)) + && (eventType == XCB_KEY_PRESS || eventType == XCB_KEY_RELEASE)) return false; // let Qt process it, it'll be intercepted again in eventFilter() +#if KWIN_QT5_PORTING if (!m_windowKiller.isNull() && m_windowKiller->isActive() && m_windowKiller->isResponsibleForEvent(e->type)) { m_windowKiller->processEvent(e); // filter out the event