[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
This commit is contained in:
Roman Gilg 2018-06-01 00:28:13 +02:00
parent 098fe1b4ca
commit 312298e2f6

View file

@ -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