[PATCH weston 4/8] shell: Update bindings to conform to pointer axis protocol
jadahl at gmail.com
Fri Sep 28 05:30:18 PDT 2012
On Fri, Sep 28, 2012 at 2:13 PM, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> On Fri, 28 Sep 2012 13:46:05 +0200
> Jonas Ådahl <jadahl at gmail.com> wrote:
>> Regarding regular mouse wheels, reading the documentation I'm not
>> sure about the expected behavior and cannot test it my self yet due to
>> lack of hardware. Considering that REL_WHEEL/REL_HWEEL events are
>> grouped together with other REL_* events one can think that they
>> should have the same measurement, or if not it should be documented
>> what they do. This might not be the case though. If the wheel events
>> behave as the wayland axis ones does it should work out of the box and
>> would have been broken before, otherwise they need to be addressed as
>> well. I'll get myself a mouse and test it sooner or later to see
>> what's actually going on.
>> There are also different kinds of scroll wheels out there, both the
>> discrete stepped one, and the "smooth" ones. Would be interesting to
>> see how these behave differently from an evdev point of view.
> I have an old discrete-stepped mouse wheel, it reports:
> Event: time 1348834027.330811, type 2 (EV_REL), code 8 (REL_WHEEL), value 1
> Event: time 1348834027.330812, -------------- SYN_REPORT ------------
> and the other direction:
Which one did you scroll downward?
> Event: time 1348834027.906825, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
> Event: time 1348834027.906827, -------------- SYN_REPORT ------------
> So it reports literally the number of "steps" it rotates. In urxvt on X,
> each step seems to scroll 5 lines.
Ok, so to emulate the axis movement for the event it needs to move a
number of pixels per event. For the X11 compositor I made it move 10
pixels units per step, maybe can do the same with evdev. Is it worth
having discrete scroll events handled separately in another way (or
even both ways) as it could be good to be able to detect discrete
scroll movements correctly as well?
More information about the wayland-devel