summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-01-31 10:53:30 -0500
committerChris Michael <cp.michael@samsung.com>2017-01-31 10:53:30 -0500
commitd90be60e474e40ecd314367c35168a727a8c6c0c (patch)
tree11605381f4bb197d8403d9402c23e5de86dc7737
parentcee7ee39932c31a21d3dd90e19703371a946a0c0 (diff)
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.
-rw-r--r--src/lib/elput/elput_input.c22
1 files 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)
163 ecore_event_add(ELPUT_EVENT_DEVICE_CHANGE, ev, _device_event_cb_free, NULL); 163 ecore_event_add(ELPUT_EVENT_DEVICE_CHANGE, ev, _device_event_cb_free, NULL);
164} 164}
165 165
166static Eina_Bool 166static void
167_device_add(Elput_Manager *em, struct libinput_device *dev) 167_device_add(Elput_Manager *em, struct libinput_device *dev)
168{ 168{
169 Elput_Seat *eseat; 169 Elput_Seat *eseat;
@@ -171,10 +171,10 @@ _device_add(Elput_Manager *em, struct libinput_device *dev)
171 const char *oname; 171 const char *oname;
172 172
173 eseat = _udev_seat_get(em, dev); 173 eseat = _udev_seat_get(em, dev);
174 if (!eseat) return EINA_FALSE; 174 if (!eseat) return;
175 175
176 edev = _evdev_device_create(eseat, dev); 176 edev = _evdev_device_create(eseat, dev);
177 if (!edev) return EINA_FALSE; 177 if (!edev) return;
178 178
179 if (edev->caps & EVDEV_SEAT_KEYBOARD) 179 if (edev->caps & EVDEV_SEAT_KEYBOARD)
180 DBG("\tDevice added as Keyboard device"); 180 DBG("\tDevice added as Keyboard device");
@@ -189,21 +189,17 @@ _device_add(Elput_Manager *em, struct libinput_device *dev)
189 eseat->devices = eina_list_append(eseat->devices, edev); 189 eseat->devices = eina_list_append(eseat->devices, edev);
190 190
191 _device_event_send(edev, ELPUT_DEVICE_ADDED); 191 _device_event_send(edev, ELPUT_DEVICE_ADDED);
192
193 return EINA_TRUE;
194} 192}
195 193
196static Eina_Bool 194static void
197_device_remove(Elput_Manager *em EINA_UNUSED, struct libinput_device *device) 195_device_remove(Elput_Manager *em EINA_UNUSED, struct libinput_device *device)
198{ 196{
199 Elput_Device *edev; 197 Elput_Device *edev;
200 198
201 edev = libinput_device_get_user_data(device); 199 edev = libinput_device_get_user_data(device);
202 if (!edev) return EINA_FALSE; 200 if (!edev) return;
203 201
204 _device_event_send(edev, ELPUT_DEVICE_REMOVED); 202 _device_event_send(edev, ELPUT_DEVICE_REMOVED);
205
206 return EINA_TRUE;
207} 203}
208 204
209static int 205static int
@@ -221,12 +217,12 @@ _udev_process_event(struct libinput_event *event)
221 switch (libinput_event_get_type(event)) 217 switch (libinput_event_get_type(event))
222 { 218 {
223 case LIBINPUT_EVENT_DEVICE_ADDED: 219 case LIBINPUT_EVENT_DEVICE_ADDED:
224 if (_device_add(em, dev)) 220 DBG("Input Device Added: %s", libinput_device_get_name(dev));
225 DBG("Input Device Added: %s", libinput_device_get_name(dev)); 221 _device_add(em, dev);
226 break; 222 break;
227 case LIBINPUT_EVENT_DEVICE_REMOVED: 223 case LIBINPUT_EVENT_DEVICE_REMOVED:
228 if (_device_remove(em, dev)) 224 DBG("Input Device Removed: %s", libinput_device_get_name(dev));
229 DBG("Input Device Removed: %s", libinput_device_get_name(dev)); 225 _device_remove(em, dev);
230 break; 226 break;
231 default: 227 default:
232 ret = 0; 228 ret = 0;