Check focused ctx while waiting in filter event waiting loop 79/141479/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Mon, 31 Jul 2017 12:25:31 +0000 (21:25 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Mon, 31 Jul 2017 22:30:57 +0000 (22:30 +0000)
Change-Id: I6dd2bb9e044a6a8f068bbce41a3f269bffda1989
(cherry picked from commit de390470fbe741b900de8db5ecea10ff85723d52)

ism/extras/wayland_immodule/wayland_imcontext.c

index ffe2b52..1a90de6 100644 (file)
@@ -3098,7 +3098,7 @@ wayland_im_context_filter_event(Ecore_IMF_Context    *ctx,
             //This function should return IME filtering result with boolean type.
             struct wl_display *display = ecore_wl_display_get();
             if (display) {
-                while (ecore_time_get() - start_time < WAIT_FOR_FILTER_DONE_SECOND && wl_display_roundtrip(display) != -1) {
+                while (ecore_time_get() - start_time < WAIT_FOR_FILTER_DONE_SECOND && _focused_ctx == ctx && wl_display_roundtrip(display) != -1) {
                     if (imcontext->last_key_event_filter.serial == serial) {
                         ret = imcontext->last_key_event_filter.state;
                         break;