From 3c6cb6a02b154ce6b7404653958aab82c58a8002 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Thu, 26 May 2016 08:42:38 -0400 Subject: [PATCH] elput: Minor formatting fixes NB: No functional changes, just cleanup of formatting Signed-off-by: Chris Michael --- src/lib/elput/elput_input.c | 17 ++++++++++++----- src/lib/elput/elput_logind.c | 2 +- src/lib/elput/elput_manager.c | 1 - 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c index e7cd92d..64431bb 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) manager->input.thread = NULL; if (!manager->input.lib) return; + manager->input.hdlr = - ecore_main_fd_handler_add(libinput_get_fd(manager->input.lib), ECORE_FD_READ, - _cb_input_dispatch, &manager->input, NULL, NULL); + ecore_main_fd_handler_add(libinput_get_fd(manager->input.lib), + ECORE_FD_READ, _cb_input_dispatch, + &manager->input, NULL, NULL); if (manager->input.hdlr) _process_events(&manager->input); @@ -302,7 +304,9 @@ static void _elput_input_init_thread(void *data, Ecore_Thread *eth EINA_UNUSED) { Elput_Manager *manager = data; - struct udev *udev = udev_new(); + struct udev *udev; + + udev = udev_new(); manager->input.lib = libinput_udev_create_context(&_input_interface, manager, udev); @@ -329,8 +333,10 @@ elput_input_init(Elput_Manager *manager) memset(&manager->input, 0, sizeof(Elput_Input)); manager->input.thread = - ecore_thread_feedback_run(_elput_input_init_thread, _elput_input_init_notify, - _elput_input_init_end, _elput_input_init_cancel, manager, 1); + ecore_thread_feedback_run(_elput_input_init_thread, + _elput_input_init_notify, + _elput_input_init_end, + _elput_input_init_cancel, manager, 1); return !!manager->input.thread; } @@ -345,6 +351,7 @@ elput_input_shutdown(Elput_Manager *manager) EINA_LIST_FREE(manager->input.seats, seat) _udev_seat_destroy(seat); + if (manager->input.thread) ecore_thread_cancel(manager->input.thread); else diff --git a/src/lib/elput/elput_logind.c b/src/lib/elput/elput_logind.c index 9658fd2..57b00dc 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) intptr_t fd = -1; if ((stat(path, &st) < 0) || (!S_ISCHR(st.st_mode))) - _logind_pipe_write_fd(em, fd); + _logind_pipe_write_fd(em, fd); else _logind_device_take_async(em, flags, major(st.st_rdev), minor(st.st_rdev)); } diff --git a/src/lib/elput/elput_manager.c b/src/lib/elput/elput_manager.c index 9b3bce4..93f39ea 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) EINA_SAFETY_ON_NULL_RETURN(manager); EINA_SAFETY_ON_NULL_RETURN(manager->interface); - if (manager->input.thread) { ecore_thread_cancel(manager->input.thread); -- 2.7.4