Stop keyboard event processing if effects have a grab
This commit is contained in:
parent
f11e3283d7
commit
1c3e0de31d
1 changed files with 3 additions and 2 deletions
|
@ -76,11 +76,12 @@ extern int currentRefreshRate();
|
||||||
*/
|
*/
|
||||||
bool Workspace::workspaceEvent(xcb_generic_event_t *e)
|
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()
|
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()
|
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)) {
|
if (!m_windowKiller.isNull() && m_windowKiller->isActive() && m_windowKiller->isResponsibleForEvent(e->type)) {
|
||||||
m_windowKiller->processEvent(e);
|
m_windowKiller->processEvent(e);
|
||||||
// filter out the event
|
// filter out the event
|
||||||
|
|
Loading…
Reference in a new issue