mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-24 10:00:28 +01:00
tablet: ignore the tablet tool name if it's a generic tool
libwacom has generic pens that are used for devices that don't have tool ids. Let's ignore the names for those pens since they're just made up names anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1422>
This commit is contained in:
parent
6d514ee6fa
commit
ad89a83ae6
2 changed files with 8 additions and 0 deletions
|
|
@ -223,6 +223,10 @@ if have_libwacom
|
|||
dependencies: dep_libwacom)
|
||||
config_h.set('HAVE_LIBWACOM_BUTTON_MODESWITCH_MODE', '1')
|
||||
endif
|
||||
if cc.has_function('libwacom_stylus_is_generic',
|
||||
dependencies: dep_libwacom)
|
||||
config_h.set('HAVE_LIBWACOM_STYLUS_IS_GENERIC', '1')
|
||||
endif
|
||||
else
|
||||
dep_libwacom = declare_dependency()
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -1662,6 +1662,10 @@ libinput_tablet_tool_get_name(struct libinput_tablet_tool *tool)
|
|||
if (!stylus)
|
||||
return NULL;
|
||||
|
||||
#ifdef HAVE_LIBWACOM_STYLUS_IS_GENERIC
|
||||
if (libwacom_stylus_is_generic(stylus))
|
||||
return NULL;
|
||||
#endif
|
||||
return libwacom_stylus_get_name(stylus);
|
||||
#else
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue