[PATCH libinput 0/24] Tablet support
Jonas Ådahl
jadahl at gmail.com
Mon Jun 2 12:14:02 PDT 2014
On Mon, Jun 02, 2014 at 10:25:02AM -0700, Bill Spitzak wrote:
> On 06/01/2014 09:18 PM, Peter Hutterer wrote:
>
> >libinput doesn't communicate over the wire, li_fixed_t is a leftover from
> >libinput being part of weston. Switching that to double would indeed make
> >things a lot easier and decouple libinput from wl-protocol-specific things.
> >
> >I'd be all up for it, though it'd be a bit of an API change that we'd have
> >to fix in the callers.
Yea, I've been considering this change as well for a while, and can
come up with patches for libinput and the users I'm aware of (weston,
clutter and xf86-input-libinput).
>
> It seems like a design goal of libinput is to avoid having to copy
> too much identical input handling into each wayland compositor, so I
> feel it makes sense for libinput to deliver data that is as close to
> what the wayland compositor will deliver to the clients as possible.
Indeed. While for motion vectors there is less risk for overflow errors
as they usually don't get close to LI_FIXED_MAX, but while other type of
data might be less problematic using floating point number type (such as
normalized data), its more consistent to use either only floating point
or fixed point and floating point is more flexible. Internally, even for
motion vectors, more or less all non-integer numbers will at one time
have been converted to floating point number before converting to fixed
point, so right now the fact that we use fixed numbers for these data
means we loose precision.
Converting to wl_fixed_t is pretty trivial, so that won't really
complicate things much for current libinput using Wayland compositors.
Its not decided how normalized data will be represented in a Wayland
tablet protocol, but if that convertion to some fixed type is non-trivial,
libinput could probably help with that if needed, as it helps with
screen output dimension based scaling.
Jonas
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list