maintain ecore_device using ref/unref func 49/173049/1
authorJengHyun Kang <jhyuni.kang@samsung.com>
Mon, 29 Jan 2018 12:44:28 +0000 (21:44 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Mon, 19 Mar 2018 08:50:16 +0000 (17:50 +0900)
Change-Id: I4bbd50997554de54fa4c6e75b9b0195646e0f52c

ism/extras/wayland_immodule/wayland_imcontext.c

index 99b64d2..6463f1d 100644 (file)
@@ -1941,6 +1941,7 @@ static void
 _ecore_keyevent_free (void *data EINA_UNUSED, void *ev)
 {
     Ecore_Event_Key *e = ev;
+    if (e->dev) ecore_device_unref(e->dev);
     free(e);
     e = NULL;
 }
@@ -1986,7 +1987,7 @@ text_input_keysym(void                 *data,
 
     e->window = (Ecore_Window)ecore_wl2_window_id_get(imcontext->window);
     e->event_window = (Ecore_Window)ecore_wl2_window_id_get(imcontext->window);
-    e->dev = _ime_device;
+    e->dev = ecore_device_ref(_ime_device);
     e->timestamp = 0; /* For distinguishing S/W keyboard event */
 
     e->modifiers = 0;