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

Jonas Ådahl jadahl at gmail.com
Sat Sep 29 06:07:04 PDT 2012

On Sat, Sep 29, 2012 at 12:01 PM, Scott Moreau <oreaus at gmail.com> wrote:
>> Ok, so what I'm trying to do is to enable what people call "smooth
>> scrolling" on an input level, meaning that scrolling is not based on
>> discrete arbitrary "steps" but on a more fluid motion. These types of
>> events makes most sense for certain types of step-less scroll wheels
>> and touchpads and I'll try to explain why.
>> When axis events are discrete steps, there is indeed little need to
>> relate to any kind of coordinate space except knowing what is "up" and
>> what is "down". A step can only be 1 or -1, thats it. This is how it
>> traditionally works in X11 (except XI2 I think supports non-discrete
>> axis events).
>> If one wants to have axis events that more resemble smooth motions,
>> such as the ones emitted by those step-less scroll wheels or
>> touchpads, one needs to specify what the events actually mean, since
>> they are no longer only limited to 1 and -1. To do this, if we specify
>> an axis event to be a vector along an axis in a coordinate space
>> identical to motion events, we can create axis events that relate to
>> some measurement already known to both the compositor and client. A
>> step-less scroll wheel would transform its scroll events to a motion
>> vector measured in pixels and a touchpad would simply emit an axis
>> event as it would emit a motion event when scrolling. A client could
>> then read these events and can scroll its view by that amount of
>> pixels specified by the value parameter.
>> Jonas
> This makes it much clearer. I saw there was some discussion in IRC a few
> days ago too. Perhaps you could put the key points you've made here, in the
> protocol description. I guess the only thing is now, evdev needs fixing to
> emit the same expected format.

Sure, I'll submit another patch with more description, and another one
updating evdev according to Pekka's evdev output. Thanks for the
input; much appreciated.


More information about the wayland-devel mailing list