[server] Send frame event instead of flush on relative pointer motion
ClosedPublic

Authored by romangg on May 31 2018, 10:48 PM.

Details

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 b6bd28ab.

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.

Diff Detail

Repository
R127 KWayland
Branch
fixRelativeMotionFrame
Lint
No Linters Available
Unit
No Unit Test Coverage
romangg created this revision.May 31 2018, 10:48 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMay 31 2018, 10:48 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
romangg requested review of this revision.May 31 2018, 10:48 PM
davidedmundson accepted this revision.Jun 25 2018, 11:00 AM
davidedmundson added a subscriber: davidedmundson.

You're matching the buttonReleased/buttonPressed/axis/etc events. So +2 for the immediate fix.

But longterm the point of sendFrame is to help batching so the current code of calling sendFrame in every send event is wrong and undermines the wayland design.
IMHO it needs to be either explicit from kwin, or alternatively some clever code here that only actually calls sendFrame once when we hit the event loop.

This revision is now accepted and ready to land.Jun 25 2018, 11:00 AM
romangg edited the summary of this revision. (Show Details)Jun 25 2018, 6:03 PM

Correct, in the end we want to combine input events and send them batched. For now the KWayland code does not allow this in general.

This revision was automatically updated to reflect the committed changes.