From d90be60e474e40ecd314367c35168a727a8c6c0c Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 31 Jan 2017 10:53:30 -0500 Subject: [PATCH] Revert "elput: Change return of device_add/remove functions" Reverting this in favor of a better way to improve debug output This reverts commit cee7ee39932c31a21d3dd90e19703371a946a0c0. --- src/lib/elput/elput_input.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c index 5f5168e657..6bb5b579e3 100644 --- a/src/lib/elput/elput_input.c +++ b/src/lib/elput/elput_input.c @@ -163,7 +163,7 @@ _device_event_send(Elput_Device *edev, Elput_Device_Change_Type type) ecore_event_add(ELPUT_EVENT_DEVICE_CHANGE, ev, _device_event_cb_free, NULL); } -static Eina_Bool +static void _device_add(Elput_Manager *em, struct libinput_device *dev) { Elput_Seat *eseat; @@ -171,10 +171,10 @@ _device_add(Elput_Manager *em, struct libinput_device *dev) const char *oname; eseat = _udev_seat_get(em, dev); - if (!eseat) return EINA_FALSE; + if (!eseat) return; edev = _evdev_device_create(eseat, dev); - if (!edev) return EINA_FALSE; + if (!edev) return; if (edev->caps & EVDEV_SEAT_KEYBOARD) DBG("\tDevice added as Keyboard device"); @@ -189,21 +189,17 @@ _device_add(Elput_Manager *em, struct libinput_device *dev) eseat->devices = eina_list_append(eseat->devices, edev); _device_event_send(edev, ELPUT_DEVICE_ADDED); - - return EINA_TRUE; } -static Eina_Bool +static void _device_remove(Elput_Manager *em EINA_UNUSED, struct libinput_device *device) { Elput_Device *edev; edev = libinput_device_get_user_data(device); - if (!edev) return EINA_FALSE; + if (!edev) return; _device_event_send(edev, ELPUT_DEVICE_REMOVED); - - return EINA_TRUE; } static int @@ -221,12 +217,12 @@ _udev_process_event(struct libinput_event *event) switch (libinput_event_get_type(event)) { case LIBINPUT_EVENT_DEVICE_ADDED: - if (_device_add(em, dev)) - DBG("Input Device Added: %s", libinput_device_get_name(dev)); + DBG("Input Device Added: %s", libinput_device_get_name(dev)); + _device_add(em, dev); break; case LIBINPUT_EVENT_DEVICE_REMOVED: - if (_device_remove(em, dev)) - DBG("Input Device Removed: %s", libinput_device_get_name(dev)); + DBG("Input Device Removed: %s", libinput_device_get_name(dev)); + _device_remove(em, dev); break; default: ret = 0;