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

Scott Moreau oreaus at gmail.com
Fri Sep 28 12:58:38 PDT 2012


On Fri, Sep 28, 2012 at 7:09 AM, Jonas Ådahl <jadahl at gmail.com> wrote:

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

Yes, I was also confused by this until considering touchpads. It still does
not
make sense when considering both, however.


> 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.
> >
>
> It makes most sense on touchpads indeed, but it is more or less the
> only coordinate space we can relate to, as I see it.


Axis events have nothing to do with a coordinate system really.


> The other way to
> make it more like the traditional protocols is to have 1 "step" be 1
> unit, and have "smooth" scroll wheels or touchpads use fractions of 1
> to step smaller steps. This would however make the coordinate space of
> the axis event harder to relate to a surface, and I don't think it's
> better.
>
> Jonas
>


Can you please explain in more detail, why the current code needs changing,
so that people without a touch device can understand the problem better?


Thanks,

Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20120928/bacc5337/attachment.html>


More information about the wayland-devel mailing list