diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2017-08-13 00:57:39 +0200 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2017-08-13 08:09:11 +0200 |
commit | 08a2afdf6fdb5ed43395e392a261cc3464214e73 (patch) | |
tree | 74b7038e581a72e25e3dce87098fd113312707a0 /backend | |
parent | 701e147b9b16fadf740b64deb89eb3f0a83980fa (diff) |
libinput backend: match logging for removal and add
Only log removal of devices once, but also log it for devices
that we do not care about.
Diffstat (limited to 'backend')
-rw-r--r-- | backend/libinput/events.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/backend/libinput/events.c b/backend/libinput/events.c index 9897dd3e..16f219a5 100644 --- a/backend/libinput/events.c +++ b/backend/libinput/events.c @@ -112,13 +112,15 @@ static void handle_device_added(struct wlr_libinput_backend *backend, static void handle_device_removed(struct wlr_libinput_backend *backend, struct libinput_device *device) { list_t *devices = libinput_device_get_user_data(device); + int vendor = libinput_device_get_id_vendor(device); + int product = libinput_device_get_id_product(device); + const char *name = libinput_device_get_name(device); + wlr_log(L_DEBUG, "Removing %s [%d:%d]", name, vendor, product); if (!devices) { return; } for (size_t i = 0; i < devices->length; i++) { struct wlr_input_device *wlr_device = devices->items[i]; - wlr_log(L_DEBUG, "Removing %s [%d:%d]", wlr_device->name, - wlr_device->vendor, wlr_device->product); wl_signal_emit(&backend->backend.events.input_remove, wlr_device); wlr_input_device_destroy(wlr_device); } |