From c17282ffc49a279553961a964f126b9da22011c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonas=20=C3=85dahl?= Date: Sat, 26 Jul 2014 21:34:47 +0200 Subject: [PATCH] evdev: Let dispatch instances set their own capabilities MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It's up to a evdev device backend to configure seat capabilities it supports. Even though it may be possible for a touchpad to have extra keys, there is currently no support for sending keyboard events from the touchpad driver, and if that would be implemented, it'd be a detail of the touchpad driver, not the generic evdev device part. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer --- src/evdev-mt-touchpad.c | 2 ++ src/evdev.c | 1 + 2 files changed, 3 insertions(+) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index b58a6caf..d831b836 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -824,6 +824,8 @@ tp_init(struct tp_dispatch *tp, if (tp_init_palmdetect(tp, device) != 0) return -1; + device->seat_caps |= EVDEV_DEVICE_POINTER; + return 0; } diff --git a/src/evdev.c b/src/evdev.c index a1255100..5a0ff909 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -707,6 +707,7 @@ evdev_configure_device(struct evdev_device *device) log_info(libinput, "input device '%s', %s is a touchpad\n", device->devname, device->devnode); + return device->dispatch == NULL ? -1 : 0; } for (i = KEY_ESC; i < KEY_MAX; i++) { if (i >= BTN_MISC && i < KEY_OK) -- 2.34.1