summaryrefslogtreecommitdiff
path: root/src/lib/elput
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-05-26 08:42:38 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-05-26 08:42:38 -0400
commit3c6cb6a02b154ce6b7404653958aab82c58a8002 (patch)
tree6dcb34ba4ac56e4820372919aa50f8702a8fec49 /src/lib/elput
parent2af9f15bf93e5a4e6c8192df59fd59b1a6fa058e (diff)
elput: Minor formatting fixes
NB: No functional changes, just cleanup of formatting Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Diffstat (limited to 'src/lib/elput')
-rw-r--r--src/lib/elput/elput_input.c17
-rw-r--r--src/lib/elput/elput_logind.c2
-rw-r--r--src/lib/elput/elput_manager.c1
3 files changed, 13 insertions, 7 deletions
diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c
index e7cd92d147..64431bb354 100644
--- a/src/lib/elput/elput_input.c
+++ b/src/lib/elput/elput_input.c
@@ -274,9 +274,11 @@ _elput_input_init_end(void *data, Ecore_Thread *eth EINA_UNUSED)
274 274
275 manager->input.thread = NULL; 275 manager->input.thread = NULL;
276 if (!manager->input.lib) return; 276 if (!manager->input.lib) return;
277
277 manager->input.hdlr = 278 manager->input.hdlr =
278 ecore_main_fd_handler_add(libinput_get_fd(manager->input.lib), ECORE_FD_READ, 279 ecore_main_fd_handler_add(libinput_get_fd(manager->input.lib),
279 _cb_input_dispatch, &manager->input, NULL, NULL); 280 ECORE_FD_READ, _cb_input_dispatch,
281 &manager->input, NULL, NULL);
280 282
281 if (manager->input.hdlr) 283 if (manager->input.hdlr)
282 _process_events(&manager->input); 284 _process_events(&manager->input);
@@ -302,7 +304,9 @@ static void
302_elput_input_init_thread(void *data, Ecore_Thread *eth EINA_UNUSED) 304_elput_input_init_thread(void *data, Ecore_Thread *eth EINA_UNUSED)
303{ 305{
304 Elput_Manager *manager = data; 306 Elput_Manager *manager = data;
305 struct udev *udev = udev_new(); 307 struct udev *udev;
308
309 udev = udev_new();
306 310
307 manager->input.lib = 311 manager->input.lib =
308 libinput_udev_create_context(&_input_interface, manager, udev); 312 libinput_udev_create_context(&_input_interface, manager, udev);
@@ -329,8 +333,10 @@ elput_input_init(Elput_Manager *manager)
329 333
330 memset(&manager->input, 0, sizeof(Elput_Input)); 334 memset(&manager->input, 0, sizeof(Elput_Input));
331 manager->input.thread = 335 manager->input.thread =
332 ecore_thread_feedback_run(_elput_input_init_thread, _elput_input_init_notify, 336 ecore_thread_feedback_run(_elput_input_init_thread,
333 _elput_input_init_end, _elput_input_init_cancel, manager, 1); 337 _elput_input_init_notify,
338 _elput_input_init_end,
339 _elput_input_init_cancel, manager, 1);
334 return !!manager->input.thread; 340 return !!manager->input.thread;
335} 341}
336 342
@@ -345,6 +351,7 @@ elput_input_shutdown(Elput_Manager *manager)
345 351
346 EINA_LIST_FREE(manager->input.seats, seat) 352 EINA_LIST_FREE(manager->input.seats, seat)
347 _udev_seat_destroy(seat); 353 _udev_seat_destroy(seat);
354
348 if (manager->input.thread) 355 if (manager->input.thread)
349 ecore_thread_cancel(manager->input.thread); 356 ecore_thread_cancel(manager->input.thread);
350 else 357 else
diff --git a/src/lib/elput/elput_logind.c b/src/lib/elput/elput_logind.c
index 9658fd2d4d..57b00dc8d4 100644
--- a/src/lib/elput/elput_logind.c
+++ b/src/lib/elput/elput_logind.c
@@ -512,7 +512,7 @@ _logind_open_async(Elput_Manager *em, const char *path, int flags)
512 intptr_t fd = -1; 512 intptr_t fd = -1;
513 513
514 if ((stat(path, &st) < 0) || (!S_ISCHR(st.st_mode))) 514 if ((stat(path, &st) < 0) || (!S_ISCHR(st.st_mode)))
515 _logind_pipe_write_fd(em, fd); 515 _logind_pipe_write_fd(em, fd);
516 else 516 else
517 _logind_device_take_async(em, flags, major(st.st_rdev), minor(st.st_rdev)); 517 _logind_device_take_async(em, flags, major(st.st_rdev), minor(st.st_rdev));
518} 518}
diff --git a/src/lib/elput/elput_manager.c b/src/lib/elput/elput_manager.c
index 9b3bce46c6..93f39ea261 100644
--- a/src/lib/elput/elput_manager.c
+++ b/src/lib/elput/elput_manager.c
@@ -58,7 +58,6 @@ elput_manager_disconnect(Elput_Manager *manager)
58 EINA_SAFETY_ON_NULL_RETURN(manager); 58 EINA_SAFETY_ON_NULL_RETURN(manager);
59 EINA_SAFETY_ON_NULL_RETURN(manager->interface); 59 EINA_SAFETY_ON_NULL_RETURN(manager->interface);
60 60
61
62 if (manager->input.thread) 61 if (manager->input.thread)
63 { 62 {
64 ecore_thread_cancel(manager->input.thread); 63 ecore_thread_cancel(manager->input.thread);