From afc80f8bd5bd218edb1050a9d2190749446eb589 Mon Sep 17 00:00:00 2001 From: Roman Gilg Date: Wed, 18 Jul 2018 19:23:00 +0200 Subject: [PATCH] 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 --- main_wayland.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/main_wayland.cpp b/main_wayland.cpp index 96da83823d..4dc80f0a58 100644 --- a/main_wayland.cpp +++ b/main_wayland.cpp @@ -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);