Wayland Relative Pointer API Progress
Michal Suchanek
hramrach at gmail.com
Mon Apr 20 06:04:25 PDT 2015
On 20 April 2015 at 14:49, x414e54 <x414e54 at linux.com> wrote:
>>> There is no sense in saying the sensor reading itself as absolute or
>>> relative. Either gives you some number in unknown units which you
>>> calibrate to get usable results. You have no idea where the stick is
>>> from the numbers you get. And there is absolutely no point caring. It
>>> may have some sense for a particular application and no sense for
>>> other.
>>
>> One of my original points was that a user should be able to hot-swap a
>> mouse and a gamepad thumbstick without a game caring and that games do
>> not care about mice/joystick/touchpad they just want raw axis values
>> that they can use, evdev makes this abstraction.
>>
>> But you certainly need to know if the axis is relative or absolute to
>> convert it to what the application needs.
>>
>
> If you had an application wanting to move an object around and I gave
> you the value 500 and then 10 seconds later 400.
> Has the object moved 900 units or -100 units? You need to know this,
> this is the difference between absolute and relative.
Actually, that's determined by the application. It can use any sensor
in relative or absolute mapping as it sees fit. And since we are
talking about replacing a controller like joystick which is typically
used in relative mode with a mouse which is typically also used in
relative mode or a tablet or touch layer which can also be used in
relative mode (eg. when scrolling) there is no real problem to solve
here. If you were really diligent you could adapt the touch layer by
adding an offset so the center of the touch area reads as 0.
>
> But there is nothing stopping me giving you the position 500 and then
> measuring the next value relatively -100 and then calculating the last
> position plus the relative distance and giving this value to you.
> Hence the hot-swapping.
There is no relative distance anywhere, ever. Unless you make one up.
The application is not interested in something you make up but in
sensor readings.
If it is interested in data you make up it can use the pointer position.
Thanks
Michal
More information about the wayland-devel
mailing list