Wayland Relative Pointer API Progress

Pekka Paalanen ppaalanen at gmail.com
Mon Apr 20 00:36:14 PDT 2015


> >> On 18 April 2015 at 16:58, x414e54 <x414e54 at linux.com> wrote:
> 
> >>> USB HID specifications define a pointer and a mouse as two completely
> >>> different inputs. A mouse can be a used as a pointer because it is
> >>> pushing the cursor around but the pointer points at a specific
> >>> location.

Okay. Using different definitions for terms from different places and
interpreting the terms used by other people with your own different
definitions is obviously going to cause disagreement.

I explained what a wl_pointer in Wayland terms is in another email.
Sounds like it is specifically not a HID pointer device.


On Sun, 19 Apr 2015 09:46:39 +0200
Michal Suchanek <hramrach at gmail.com> wrote:

> So the device is always absolute and interpretation varies.

I disagree.

Let's take a mouse, optical or ball, doesn't matter. What you get out
is a position delta over time. This is also know as velocity. Sampling
rate affects the scale of the values, and you cannot reasonably define
a closed range for the possible values. There is no home position. All
this reads to me as "relative". The home position is the important
thing, and that the home position is observable by the human user.

Take a joystick. The stick has a home position, the center. You can
only tilt the stick up to it's hardware limits. Those limits are well
established and obvious to the human using the stick without knowing
anything else than just looking at the device. The measurements you get
tell you the position of the stick. Sampling rate does not affect the
readings, and they are not related to time. Therefore the readings are
not velocity but position. This is what I would call "absolute".

Yes, the trackpoint has been raised here before, and it seems much
closer to a joystick than a traditional mouse. That's ok, you probably
could use it as a joystick, since it does have a home position that is
obvious to a human user. Like you said, for trackpoints the absolute
measurement is only interpreted as a velocity through some
non-decreasing function.

A mouse could be an absolute device only if you were never able to lift
it off the table and move it without it generating motion events. This
is something you cannot do with an absolute device like a joystick.

> You are trying to make a distinction that is only relevant to use of
> the device readings for generating pointer motion events but otherwise
> does not exist.

Converting one input device to emulate another (trackpoint -> mouse,
touchpad -> mouse, keyboard -> mouse, mouse -> keyboard, mouse ->
joystick) is one thing. I don't think that is on topic here.

A mouse is inherently a relative input device. What we're discussing
here is exposing the relative measurements to apps, rather than the
absolute position that the compositor manufactures by integrating over
the relative measurements.


Thanks,
pq


More information about the wayland-devel mailing list