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

Peter Hutterer peter.hutterer at who-t.net
Tue Feb 24 17:02:16 PST 2015


On Tue, Feb 24, 2015 at 11:16:32AM -0500, Benjamin Tissoires wrote:
> 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]

fixed, thanks

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

fixed by making it inline, that shuts up gcc.

> >
> > 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)

yeah, that's something we can fix once libwacom declares the axes per tool.
Then we don't need to care about the type of the stylus at all, we simply
copy all bits that libwacom tells us the stylus has.

> - 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.

the wheel on the wacom mouse is a REL_WHEEL, so there isn't really an
absolute position. the current behaviour is consistent with the pointer
interface and it's documented too:

 * - @ref LIBINPUT_TABLET_AXIS_REL_WHEEL - A relative wheel on the tool,
 *   similar or equivalent to a mouse wheel. The value is always 0, use
 *   libinput_event_tablet_get_axis_delta() instead.
 
tbh, I don't think we gain much by providing the absolute wheel position
here.


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

thanks for testing, much appreciated.

Cheers,
   Peter
> 
> Again, I'll try to review the patches one by one.
> 
> Cheers,
> Benjamin


More information about the wayland-devel mailing list