diff --git a/data/wacom-cintiq-24hd-touch.tablet b/data/wacom-cintiq-24hd-touch.tablet index 8f44ea2d..ca25c207 100644 --- a/data/wacom-cintiq-24hd-touch.tablet +++ b/data/wacom-cintiq-24hd-touch.tablet @@ -44,7 +44,6 @@ Name=Wacom Cintiq 24HD touch ModelName=DTH-2400 DeviceMatch=usb|056a|00f8 PairedID=usb|056a|00f6 -Class=Cintiq Width=21 Height=13 Layout=wacom-cintiq-24hd.svg diff --git a/data/wacom-cintiq-27hdt.tablet b/data/wacom-cintiq-27hdt.tablet index 8c10b682..104bb182 100644 --- a/data/wacom-cintiq-27hdt.tablet +++ b/data/wacom-cintiq-27hdt.tablet @@ -9,7 +9,6 @@ Name=Wacom Cintiq 27QHD touch ModelName=DTH-2700 DeviceMatch=usb|056a|032b PairedID=usb|056a|032c -Class=Cintiq Width=24 Height=12 Styli=@intuos5;@propengen2; diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c index 287757e5..54e9bffe 100644 --- a/libwacom/libwacom.c +++ b/libwacom/libwacom.c @@ -1362,7 +1362,17 @@ libwacom_get_height(const WacomDevice *device) LIBWACOM_EXPORT WacomClass libwacom_get_class(const WacomDevice *device) { - return device->cls; + if (device->cls != WCLASS_UNKNOWN) { + return device->cls; + } + if (device->integration_flags & WACOM_DEVICE_INTEGRATED_DISPLAY && + device->integration_flags & WACOM_DEVICE_INTEGRATED_SYSTEM) { + return WCLASS_ISDV4; + } + if (device->integration_flags & WACOM_DEVICE_INTEGRATED_DISPLAY) { + return WCLASS_CINTIQ; + } + return WCLASS_BAMBOO; } LIBWACOM_EXPORT int diff --git a/test/test-load.c b/test/test-load.c index 08aa8070..ec9689e9 100644 --- a/test/test-load.c +++ b/test/test-load.c @@ -202,6 +202,7 @@ test_cintiq24hdt(struct fixture *f, gconstpointer user_data) const WacomMatch *match; g_assert_nonnull(device); + g_assert_cmpint(libwacom_get_class(device), ==, WCLASS_CINTIQ); /* 24HDT has one paired device */ match = libwacom_get_paired_device(device);