Call workspaceEvent and updateX11Time only once per event

Summary:
On Wayland processXcbEvents calls workspaceEvents and updateX11Time but this
is already done in the native event filter.

Test Plan:
Manual test shows Xwayland still works and constant calls to
XcbEventFilter::nativeEventFilter are processed.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14215
icc-effect-5.14.5
Roman Gilg 2018-07-18 19:23:00 +02:00
parent 5575a5274c
commit afc80f8bd5
1 changed files with 1 additions and 8 deletions

View File

@ -219,15 +219,8 @@ void ApplicationWayland::continueStartupWithX()
QSocketNotifier *notifier = new QSocketNotifier(xcb_get_file_descriptor(c), QSocketNotifier::Read, this);
auto processXcbEvents = [this, c] {
while (auto event = xcb_poll_for_event(c)) {
updateX11Time(event);
long result = 0;
if (QThread::currentThread()->eventDispatcher()->filterNativeEvent(QByteArrayLiteral("xcb_generic_event_t"), event, &result)) {
free(event);
continue;
}
if (Workspace::self()) {
Workspace::self()->workspaceEvent(event);
}
QThread::currentThread()->eventDispatcher()->filterNativeEvent(QByteArrayLiteral("xcb_generic_event_t"), event, &result);
free(event);
}
xcb_flush(c);