summaryrefslogtreecommitdiff
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
parentff22abc4be33ae03542e6ab97acaebe77152614d (diff)
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
1605 wl_seat_add_listener(input->wl.seat, &_seat_listener, input); 1605 wl_seat_add_listener(input->wl.seat, &_seat_listener, input);
1606 wl_seat_set_user_data(input->wl.seat, input); 1606 wl_seat_set_user_data(input->wl.seat, input);
1607 1607
1608 if (!display->wl.data_device_manager) return;
1609
1610 input->data.device =
1611 wl_data_device_manager_get_data_device(display->wl.data_device_manager,
1612 input->wl.seat);
1613 wl_data_device_add_listener(input->data.device, &_data_listener, input);
1614
1615 input->dev_add_handler = 1608 input->dev_add_handler =
1616 ecore_event_handler_add(ECORE_WL2_EVENT_DEVICE_ADDED, 1609 ecore_event_handler_add(ECORE_WL2_EVENT_DEVICE_ADDED,
1617 _ecore_wl2_cb_device_event, input); 1610 _ecore_wl2_cb_device_event, input);
@@ -1619,6 +1612,13 @@ _ecore_wl2_input_add(Ecore_Wl2_Display *display, unsigned int id, unsigned int v
1619 input->dev_remove_handler = 1612 input->dev_remove_handler =
1620 ecore_event_handler_add(ECORE_WL2_EVENT_DEVICE_REMOVED, 1613 ecore_event_handler_add(ECORE_WL2_EVENT_DEVICE_REMOVED,
1621 _ecore_wl2_cb_device_event, input); 1614 _ecore_wl2_cb_device_event, input);
1615
1616 if (!display->wl.data_device_manager) return;
1617
1618 input->data.device =
1619 wl_data_device_manager_get_data_device(display->wl.data_device_manager,
1620 input->wl.seat);
1621 wl_data_device_add_listener(input->data.device, &_data_listener, input);
1622} 1622}
1623 1623
1624void 1624void