[tabbox] Create X11Filter on establishKeyboardGrab

Summary:
Creating the X11Filter directly on startup caused a regression as the
filter got too early in the chain and stole events from the
XInputIntegrationFilter. We don't need the filter all the time, but only
when we have established the TabBox grab. Likewise we can destroy the
filter again when releasing the TabBox grab. So it's much more
encapsulated now.

BUG: 385032

Test Plan: Only compile tested, I'm on Wayland

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7997
master
Martin Flöser 7 years ago
parent bc92745f07
commit bc88f84777

@ -505,10 +505,6 @@ TabBox::TabBox(QObject *parent)
m_tabBoxMode = TabBoxDesktopMode; // init variables
connect(&m_delayedShowTimer, SIGNAL(timeout()), this, SLOT(show()));
connect(Workspace::self(), SIGNAL(configChanged()), this, SLOT(reconfigure()));
if (kwinApp()->operationMode() == Application::OperationModeX11) {
m_x11EventFilter.reset(new X11Filter);
}
}
TabBox::~TabBox()
@ -1591,6 +1587,7 @@ bool TabBox::establishTabBoxGrab()
m_forcedGlobalMouseGrab = true;
if (Workspace::self()->activeClient() != nullptr)
Workspace::self()->activeClient()->updateMouseGrab();
m_x11EventFilter.reset(new X11Filter);
return true;
}
@ -1606,6 +1603,7 @@ void TabBox::removeTabBoxGrab()
m_forcedGlobalMouseGrab = false;
if (Workspace::self()->activeClient() != nullptr)
Workspace::self()->activeClient()->updateMouseGrab();
m_x11EventFilter.reset();
}
} // namespace TabBox
} // namespace

Loading…
Cancel
Save