From 312298e2f6bc9d368440f412500af2ec53d3e5be Mon Sep 17 00:00:00 2001 From: Roman Gilg Date: Fri, 1 Jun 2018 00:28:13 +0200 Subject: [PATCH] [server] Send frame event instead of flush on relative pointer motion Summary: This solves for me not working relative pointer motion with grab/lock in Xwayland applications. Looking at the Xwayland code it is clear, that it expects a frame event on wl_pointer versions 5 and above after relative motion events. wl_pointer version 5 support was added to KWayland in c29035a6. If the cursor is locked no absolute motion events are sent. In this case to make sure relative motion events are processed by the client, send the frame event after every relative motion. BUG: 395815 Test Plan: Manually with Neverball in Xwayland mode. Reviewers: #plasma, #kwin, #frameworks, davidedmundson Reviewed By: #plasma, #kwin, davidedmundson Subscribers: davidedmundson, kde-frameworks-devel Tags: #frameworks Maniphest Tasks: T8923 Differential Revision: https://phabricator.kde.org/D13257 --- src/wayland/pointer_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland/pointer_interface.cpp b/src/wayland/pointer_interface.cpp index 1a4c33823b..6512f63d1c 100644 --- a/src/wayland/pointer_interface.cpp +++ b/src/wayland/pointer_interface.cpp @@ -352,7 +352,7 @@ void PointerInterface::relativeMotion(const QSizeF &delta, const QSizeF &deltaNo for (auto it = d->relativePointers.constBegin(), end = d->relativePointers.constEnd(); it != end; it++) { (*it)->relativeMotion(delta, deltaNonAccelerated, microseconds); } - client()->flush(); + d->sendFrame(); } PointerInterface::Private *PointerInterface::d_func() const