~kubuntu-phablet-team-unofficial/xserver-xorg-input-libinput/master

Viewing all changes in revision 256.

  • Committer: Peter Hutterer
  • Date: 2019-01-25 04:31:11 UTC
  • Revision ID: git-v1:e7eafa199e9e60c15014a9d72d14efcbbf8e44ca
Handle scroll wheel events with a discrete of 0

The driver currently assumes that any wheel event has a non-zero discrete
value of 1. This is incorrect, it just hasn't triggered yet with any device.

With the hi-res scroll patches in place in the kernel and libinput, we may get
wheel events with a discrete value of 0. We assume that if this ever happens,
the device has some sensible click angle set so all we need to do is ignore
the discrete 0 events and wait for the first discrete event to come.

Also add an explanatory comment too to make it clear the calculation is only
done once.

Fixes #19

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: