mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-09 02:50:16 +01:00
tablet: default to a built-in tablet
The vast majority of devices that libwacom doesn't know about are the various built-in ones. Since the only effect in our code here is that we enable the calibration matrix, let's default to built-in if we don't know any better - better to have the matrix and not use it than to not be able to calibrate a tablet. Note that libwacom 2.11 and later also now default to a built-in tablet. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1074>
This commit is contained in:
parent
2ac4227843
commit
d1e49c7b3d
2 changed files with 9 additions and 5 deletions
|
|
@ -2594,10 +2594,10 @@ static inline bool
|
|||
tablet_is_display_tablet(WacomDevice *wacom)
|
||||
{
|
||||
#if HAVE_LIBWACOM
|
||||
return wacom &&
|
||||
!!(libwacom_get_integration_flags(wacom) & (WACOM_DEVICE_INTEGRATED_SYSTEM|WACOM_DEVICE_INTEGRATED_DISPLAY));
|
||||
return !wacom ||
|
||||
(libwacom_get_integration_flags(wacom) & (WACOM_DEVICE_INTEGRATED_SYSTEM|WACOM_DEVICE_INTEGRATED_DISPLAY));
|
||||
#else
|
||||
return false;
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3683,10 +3683,14 @@ END_TEST
|
|||
static bool
|
||||
device_has_calibration(struct litest_device *dev)
|
||||
{
|
||||
bool has_calibration = libevdev_has_property(dev->evdev, INPUT_PROP_DIRECT);
|
||||
|
||||
if (has_calibration)
|
||||
if (libevdev_has_property(dev->evdev, INPUT_PROP_DIRECT))
|
||||
return true;
|
||||
|
||||
bool has_calibration =
|
||||
libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_PEN) ||
|
||||
libevdev_has_event_code(dev->evdev, EV_KEY, BTN_STYLUS);
|
||||
|
||||
#if HAVE_LIBWACOM
|
||||
WacomDeviceDatabase *db = libwacom_database_new();
|
||||
if (db) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue