forked from enlightenment/efl
Revert "elput: Change return of device_add/remove functions"
Reverting this in favor of a better way to improve debug output
This reverts commit cee7ee3993
.
This commit is contained in:
parent
cee7ee3993
commit
d90be60e47
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue