diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c index ed738970..1ffb910a 100644 --- a/libwacom/libwacom.c +++ b/libwacom/libwacom.c @@ -818,6 +818,7 @@ libwacom_new_from_path(const WacomDeviceDatabase *db, const char *path, WacomFal builder = libwacom_builder_new(); libwacom_builder_set_match_name(builder, name); + libwacom_builder_set_device_name(builder, name); libwacom_builder_set_bustype(builder, bus); libwacom_builder_set_uniq(builder, uniq); libwacom_builder_set_usbid(builder, vendor_id, product_id); diff --git a/test/test_libwacom.py b/test/test_libwacom.py index 385b4a97..ef586655 100644 --- a/test/test_libwacom.py +++ b/test/test_libwacom.py @@ -386,7 +386,9 @@ def test_new_unknown_device_with_fallback(custom_datadir, fallback, bustype): USBID = (0x1234, 0x5678) NAME = "nameval" db = WacomDatabase(path=custom_datadir) - builder = WacomBuilder.create(usbid=USBID, bus=bustype, match_name=NAME) + builder = WacomBuilder.create( + usbid=USBID, bus=bustype, match_name=NAME, device_name=NAME + ) device = db.new_from_builder(builder, fallback=fallback) if fallback: @@ -397,5 +399,6 @@ def test_new_unknown_device_with_fallback(custom_datadir, fallback, bustype): assert device.bustype == WacomBustype.UNKNOWN assert device.vendor_id == 0 assert device.product_id == 0 + assert device.name == NAME else: assert device is None