[PATCH v2 libinput 00/26] tablet: support the remaining tools

Benjamin Tissoires benjamin.tissoires at gmail.com
Tue Feb 24 08:16:32 PST 2015


Hi Peter,

On Tue, Feb 24, 2015 at 1:21 AM, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
>
> This is a v2 of the patchset here
> http://lists.freedesktop.org/archives/wayland-devel/2015-February/020036.html
> but reshuffled, rebased and a couple of things merged in. Notable:
> libinput now uses libwacom to get tool/tablet information. This is complete
> for this set yet, but a few more fixes are due to go into libwacom (e.g.
> axis listing) so we can remove this knowledge from libinput. Likewise, the
> missing eraser stylus buttons Lyude pointed out in the other thread will be
> fixed in libwacom.
>
> If libwacom isn't available, we fall back on basic logic to set the various
> bits on the tools.

BTW, compiling with --disable-libwacom raises 2 warnings:

evdev-tablet.c: In function 'tool_set_bits_from_libwacom':
evdev-tablet.c:652:1: warning: no return statement in function
returning non-void [-Wreturn-type]

and

evdev-tablet.c:583:1: warning: 'tool_set_bits_from_libwacom' defined
but not used [-Wunused-function]

>
> mouse buttons and the mouse wheel are now handled. art pen rotation is
> fixed, was relying on BTN_TOOL_BRUSH first - the art pen is a BTN_TOOL_PEN.
> other patches have seen a rebase and reshuffle and thus seen slight changes.
>
> added get_axis_delta and get_axis_delta_discrete(). The latter for the mouse
> wheel, the former allows the caller to make a decision about the tablet mode
> on a per-event or per-client basis.
>
> The couple of libwacom issues aside, this should make the tablet-support
> branch feature-complete.
>
> branch available for testing:
> https://github.com/whot/libinput/tree/wip/wacom-extra-tool-support


Actually, there are still some bumps here and there (not sure it worth
a v3, could be fixed later):

- the erasers of the artpen and the airbrush are declared as their
type, so even if libwacom correctly does not declare rotation and
slider, event-debug consider they have some (the copy bits is based on
the tools, not the capabilities)
- the wheel value of the mouse is rather weird: either +15, -15 and 0
(0 is reported whenever the wheel change value). I would have expected
that we count the actual absolute position of the wheel. But this is
what we currently have to the generic mice, so we might prefer to
stick to what we currently have.

Nothing to report on the rest of the devices once libwacom is fixed
locally and with the tablets not handled by libwacom.

Again, I'll try to review the patches one by one.

Cheers,
Benjamin


More information about the wayland-devel mailing list