From 9802ada6069df4ffb001631a926bd45a5b005c45 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 3 May 2019 13:52:09 +1000 Subject: [PATCH] touchpad: don't check libwacom if we're not tagged as tablet touchpad No need to go through the effort if we're not tagged as a tablet+touchpad device anyway. Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 34693f31..ec81e080 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -3734,13 +3734,16 @@ tp_init_left_handed_rotation(struct tp_dispatch *tp, { bool rotate = false; #if HAVE_LIBWACOM - WacomDeviceDatabase *db; + WacomDeviceDatabase *db = NULL; WacomDevice **devices = NULL, **d; WacomDevice *dev; uint32_t vid = evdev_device_get_id_vendor(device), pid = evdev_device_get_id_product(device); + if ((device->tags & EVDEV_TAG_TABLET_TOUCHPAD) == 0) + goto out; + db = libwacom_database_new(); if (!db) { evdev_log_info(device,