diff --git a/tools/libinput-record.c b/tools/libinput-record.c index c1b20ef6..0c1dc9cf 100644 --- a/tools/libinput-record.c +++ b/tools/libinput-record.c @@ -1757,6 +1757,16 @@ print_udev_properties(struct record_device *dev) entry = udev_list_entry_get_next(entry); } + for (struct udev_device *parent = udev_device; + parent; + parent = udev_device_get_parent(parent)) { + const char *driver = udev_device_get_property_value(parent, "DRIVER"); + if (driver) { + iprintf(dev->fp, I_UDEV_DATA, "- DRIVER=%s\n", driver); + break; + } + } + out: udev_device_unref(udev_device); udev_unref(udev); diff --git a/tools/libinput-replay.py b/tools/libinput-replay.py index c24cb8ca..85da4006 100755 --- a/tools/libinput-replay.py +++ b/tools/libinput-replay.py @@ -71,14 +71,13 @@ def check_udev_properties(yaml_data, uinput): """ yaml_udev_section = fetch(yaml_data, "udev") yaml_udev_props = fetch(yaml_udev_section, "properties") + + ignore = ["LIBINPUT_DEVICE_GROUP", "DRIVER"] yaml_props = { - k: v for (k, v) in [prop.split("=", maxsplit=1) for prop in yaml_udev_props] + k: v + for (k, v) in [prop.split("=", maxsplit=1) for prop in yaml_udev_props] + if k not in ignore } - try: - # We don't assign this one to virtual devices - del yaml_props["LIBINPUT_DEVICE_GROUP"] - except KeyError: - pass # give udev some time to catch up time.sleep(0.2)