aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_wl2/ecore_wl2_input.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-07-10 13:02:43 -0400
committerChris Michael <cp.michael@samsung.com>2017-07-10 13:02:43 -0400
commit0c6aae1516f7133316cfeb89c6e5964630cb3249 (patch)
treea70f89ab0f54b63d3df2ef4fa668068ed37e5f0f /src/lib/ecore_wl2/ecore_wl2_input.c
parentecore-wl2: Rename internal function (diff)
downloadefl-0c6aae1516f7133316cfeb89c6e5964630cb3249.tar.gz
ecore-wl2: Add event handlers even if no data device manager exists
If we have no data device manager present, we would still like to receive events when input devices get added or removed so these handlers should be setup before we return from this function. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_input.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index 407f8f5600..985aa71ec8 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -1605,13 +1605,6 @@ _ecore_wl2_input_add(Ecore_Wl2_Display *display, unsigned int id, unsigned int v
wl_seat_add_listener(input->wl.seat, &_seat_listener, input);
wl_seat_set_user_data(input->wl.seat, input);
- if (!display->wl.data_device_manager) return;
-
- input->data.device =
- wl_data_device_manager_get_data_device(display->wl.data_device_manager,
- input->wl.seat);
- wl_data_device_add_listener(input->data.device, &_data_listener, input);
-
input->dev_add_handler =
ecore_event_handler_add(ECORE_WL2_EVENT_DEVICE_ADDED,
_ecore_wl2_cb_device_event, input);
@@ -1619,6 +1612,13 @@ _ecore_wl2_input_add(Ecore_Wl2_Display *display, unsigned int id, unsigned int v
input->dev_remove_handler =
ecore_event_handler_add(ECORE_WL2_EVENT_DEVICE_REMOVED,
_ecore_wl2_cb_device_event, input);
+
+ if (!display->wl.data_device_manager) return;
+
+ input->data.device =
+ wl_data_device_manager_get_data_device(display->wl.data_device_manager,
+ input->wl.seat);
+ wl_data_device_add_listener(input->data.device, &_data_listener, input);
}
void