Initial libWacom support
ClosedPublic

Authored by valeriymalov on Apr 5 2018, 9:13 PM.

Details

Summary

Store vendor ID in tablet information when detecting connected tablets.
This is later used for libWacom lookup.
Look up tablet information via libWacom if tablet is not found in local
and system device databases.

Test Plan

temporary removed tablet definiton from the bundled DB and checked that it still works with libwacom picked defintion

Diff Detail

Repository
R530 Wacom tablet support
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
valeriymalov requested review of this revision.Apr 5 2018, 9:13 PM
valeriymalov created this revision.
fvogt added a comment.Apr 6 2018, 7:37 AM

Looks ok to me, I just added a few suggestions.

src/common/libwacomwrapper.cpp
50

I suggest to use a std::unique_ptr with custom deleter here instead of calling the free functions manually.

src/common/libwacomwrapper.h
37

Also move to the private: section?

src/kded/tabletfinder.cpp
187–188

I'd keep the "Could not find tablet with id '%1' in database." message, currently it doesn't show the ID if it's not found.

valeriymalov marked 3 inline comments as done.

Fixes according to comments

fvogt accepted this revision.Apr 6 2018, 6:10 PM

LGTM - compile tested only. My tablet doesn't go into the libwacom codepath anyway.

This revision is now accepted and ready to land.Apr 6 2018, 6:10 PM
  • Fix setting NumPadButtons in TabletInformation from libwacom (int gets converted to bool because there's no int version of set())
This revision was automatically updated to reflect the committed changes.