[PATCH libinput] evdev: log configured device info
Jonas Ådahl
jadahl at gmail.com
Sat Apr 12 01:05:46 PDT 2014
On Fri, Apr 11, 2014 at 04:27:01PM -0700, U. Artie Eoff wrote:
> Bring back the device configure logging that was originally part of
> Weston's evdev.
Pushed, with minor alterations to indentation. Thanks.
Jonas
>
> Signed-off-by: U. Artie Eoff <ullysses.a.eoff at intel.com>
> ---
> src/evdev.c | 20 +++++++++++++++++---
> 1 file changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/src/evdev.c b/src/evdev.c
> index 72e4086..755a3a3 100644
> --- a/src/evdev.c
> +++ b/src/evdev.c
> @@ -601,6 +601,8 @@ evdev_configure_device(struct evdev_device *device)
> !libevdev_has_event_code(device->evdev, EV_KEY, BTN_TOOL_PEN) &&
> (has_abs || has_mt)) {
> device->dispatch = evdev_mt_touchpad_create(device);
> + log_info("input device '%s', %s is a touchpad\n",
> + device->devname, device->devnode);
> }
> for (i = KEY_ESC; i < KEY_MAX; i++) {
> if (i >= BTN_MISC && i < KEY_OK)
> @@ -622,12 +624,24 @@ evdev_configure_device(struct evdev_device *device)
> if (libevdev_has_event_type(device->evdev, EV_LED))
> has_keyboard = 1;
>
> - if ((has_abs || has_rel) && has_button)
> + if ((has_abs || has_rel) && has_button) {
> device->seat_caps |= EVDEV_DEVICE_POINTER;
> - if (has_keyboard)
> + log_info("input device '%s', %s is a pointer caps =%s%s%s\n",
> + device->devname, device->devnode,
> + has_abs ? " absolute-motion" : "",
> + has_rel ? " relative-motion": "",
> + has_button ? " button" : "");
> + }
> + if (has_keyboard) {
> device->seat_caps |= EVDEV_DEVICE_KEYBOARD;
> - if (has_touch && !has_button)
> + log_info("input device '%s', %s is a keyboard\n",
> + device->devname, device->devnode);
> + }
> + if (has_touch && !has_button) {
> device->seat_caps |= EVDEV_DEVICE_TOUCH;
> + log_info("input device '%s', %s is a touch device\n",
> + device->devname, device->devnode);
> + }
>
> return 0;
> }
> --
> 1.9.0
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list