diff --git a/meson.build b/meson.build index ed26b5dc..7618da3a 100644 --- a/meson.build +++ b/meson.build @@ -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 diff --git a/src/libinput.c b/src/libinput.c index 47c6c6ff..768c8e3e 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -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;