Send axis_source, axis_discrete, and axis_stop
ClosedPublic

Authored by zzag on Feb 14 2019, 11:06 AM.

Details

Summary

So far KWin didn't send axis_source, axis_discrete, and axis_stop. Even
though most of those events are optional, clients need them to work as
expected. For example, one needs axis_source and axis_stop to implement
kinetic scrolling; Xwayland needs axis_discrete to prevent multiple
scroll events when the compositor sends axis deltas greater than 10, etc.

BUG: 404152
FIXED-IN: 5.16.0

Test Plan
  • Content of a webpage in Firefox is moved by one line per each mouse wheel "click";
  • Scrolled gedit using 2 fingers on GNOME Shell, sway, and KDE Plasma; in all three cases wayland debug looked the same (except diagonal scroll motions).

Diff Detail

Repository
R108 KWin
Branch
implement-axis-discrete-event
Lint
Lint ErrorsExcuse: cppcheck can't find definition of Q_DECLARE_METATYPE macro
SeverityLocationCodeMessage
Errorlibinput/device.h:579CppcheckunknownMacro
Unit
No Unit Test Coverage
Build Status
Buildable 10657
Build 10675: arc lint + arc unit
zzag created this revision.Feb 14 2019, 11:06 AM
Restricted Application added a project: KWin. · View Herald TranscriptFeb 14 2019, 11:06 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Feb 14 2019, 11:06 AM
zzag edited the test plan for this revision. (Show Details)Feb 14 2019, 11:11 AM
zzag edited the test plan for this revision. (Show Details)Feb 14 2019, 11:16 AM
zzag edited the test plan for this revision. (Show Details)Apr 9 2019, 10:35 AM
zzag updated this revision to Diff 55811.Apr 9 2019, 11:51 AM

edit comment

davidedmundson accepted this revision.Apr 24 2019, 11:07 PM
davidedmundson added a subscriber: davidedmundson.
davidedmundson added inline comments.
kwinnamespace.h
21

utils.h is the general dumping ground for a random global enum in the kwin namespace

This revision is now accepted and ready to land.Apr 24 2019, 11:07 PM
zzag added inline comments.Apr 25 2019, 8:29 AM
kwinnamespace.h
21

Okay, I'll figure out how to put the enum there. The problem is that some X header file has defined None macro, which results in compilation error (QuickTileFlag enum has None enumerator).

zzag added inline comments.Apr 25 2019, 9:57 AM
kwinnamespace.h
21

So, the rationale behind moving PointerAxisSource into a header was to avoid including "input.h" in platform.h and input_event.h. I guess I could reorder includes, but meh, it gets messy quite fast.

Alternatively, I could still put PointerAxisSource in InputRedirection class....

zzag planned changes to this revision.Apr 25 2019, 10:19 AM

Alternatively, I could still put PointerAxisSource in InputRedirection class....

It's where "PointerAxis" is, they seem related. Works for me.
Seems a shame for this to get blocked over a tiny comment over about where an enum should be.

zzag added a comment.May 10 2019, 7:11 AM

Seems a shame for this to get blocked over a tiny comment over about where an enum should be.

Well, the main blocker is the kwayland part. :-)

zzag updated this revision to Diff 57880.May 10 2019, 4:24 PM

Move PointerAxisSource enum to InputRedirection class.

Some parts of code don't look good visually.

This revision is now accepted and ready to land.May 10 2019, 4:24 PM
zzag updated this revision to Diff 57881.May 10 2019, 4:29 PM

Make some parts of code more visually appealing.

This revision was automatically updated to reflect the committed changes.