[PATCH weston 4/8] shell: Update bindings to conform to pointer axis protocol

Pekka Paalanen ppaalanen at gmail.com
Fri Sep 28 05:47:35 PDT 2012


On Fri, 28 Sep 2012 14:30:18 +0200
Jonas Ådahl <jadahl at gmail.com> wrote:

> On Fri, Sep 28, 2012 at 2:13 PM, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> > 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?

Negative is down, positive is up.

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

Do you mean adding more protocol for discrete axis motion? I don't
know. At first thought it seems just emitting motion in steps of 10 or
whatever is good enough.

Btw. the clarify pointer axis event -commit didn't make too much sense
until I thought of touchpads. On mice, the motion and wheel are
inherently in different, arbitrary units. One might even argue, that
for wheels, the motion is an angle instead of a length. I don't have
any strong opinions here, and I don't know how existing smooth
scrolling works.


Thanks,
pq


More information about the wayland-devel mailing list