ecore_wl: add ecore_wl_input_devices_send() for newly created window 24/79124/5 submit/tizen/20160711.050109
authorDuna Oh <duna.oh@samsung.com>
Fri, 8 Jul 2016 08:41:07 +0000 (17:41 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Mon, 11 Jul 2016 04:52:08 +0000 (21:52 -0700)
Signed-off-by: Duna Oh <duna.oh@samsung.com>
Change-Id: Iee13cf53419f5e8ea8bebd507a4b4e392a61fb1d

src/lib/ecore_wayland/ecore_wl_input.c
src/lib/ecore_wayland/ecore_wl_private.h
src/lib/ecore_wayland/ecore_wl_window.c

index d8e090d..b2dd7f8 100644 (file)
@@ -2134,6 +2134,24 @@ _ecore_wl_input_device_info_broadcast(const char *name, const char *identifier,
 }
 
 void
+_ecore_wl_input_devices_send(Ecore_Wl_Input *input, Ecore_Wl_Window *win)
+{
+   Eina_List *l;
+   Ecore_Wl_Input_Device *dev;
+   Eina_Bool ret = EINA_FALSE;
+
+   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+   if (!input) return;
+
+   EINA_LIST_FOREACH(input->devices, l, dev)
+     {
+        ret = _ecore_wl_input_add_ecore_device(dev->name, dev->identifier, dev->clas);
+        DBG("ecore_device added.. dev->name:%s, dev->identifier:%s, ret:%d", dev->name? : "NULL", dev->identifier? : "NULL", ret);
+        _ecore_wl_input_device_info_send(win->id, dev->name, dev->identifier, dev->clas, EINA_TRUE);
+     }
+}
+
+void
 _ecore_wl_input_device_manager_setup(unsigned int id)
 {
    _ecore_wl_disp->wl.tz_input_device_manager =
index 8c324d6..f9c38ba 100644 (file)
@@ -394,6 +394,7 @@ void _ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id);
 void _ecore_wl_input_del(Ecore_Wl_Input *input);
 void _ecore_wl_input_pointer_xy_get(int *x, int *y);
 void _ecore_wl_input_grab_release(Ecore_Wl_Input *input, Ecore_Wl_Window *win);
+void _ecore_wl_input_devices_send(Ecore_Wl_Input *input, Ecore_Wl_Window *win);
 
 void _ecore_wl_dnd_add(Ecore_Wl_Input *input, struct wl_data_device *data_device, struct wl_data_offer *offer);
 void _ecore_wl_dnd_enter(void *data, struct wl_data_device *data_device, unsigned int timestamp, struct wl_surface *surface, int x, int y, struct wl_data_offer *offer);
index edf4c7f..f24276c 100644 (file)
@@ -585,6 +585,8 @@ ecore_wl_window_show(Ecore_Wl_Window *win)
    ecore_wl_window_surface_create(win);
 
    _ecore_wl_window_shell_surface_init(win);
+
+   _ecore_wl_input_devices_send(_ecore_wl_disp->input, win);
 }
 
 EAPI void