From 62b616e57650c5727cad125d80d0adb0a655e7eb Mon Sep 17 00:00:00 2001 From: JengHyun Kang Date: Mon, 29 Jan 2018 21:44:28 +0900 Subject: [PATCH] maintain ecore_device using ref/unref func Change-Id: I4bbd50997554de54fa4c6e75b9b0195646e0f52c --- ism/extras/wayland_immodule/wayland_imcontext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ism/extras/wayland_immodule/wayland_imcontext.c b/ism/extras/wayland_immodule/wayland_imcontext.c index 99b64d2..6463f1d 100644 --- a/ism/extras/wayland_immodule/wayland_imcontext.c +++ b/ism/extras/wayland_immodule/wayland_imcontext.c @@ -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; -- 2.7.4