Reduce the wait time for key processing to prevent deadlock
[platform/core/uifw/isf.git] / ism / extras / wayland_immodule / wayland_imcontext.c
index 4942e84..970a14f 100644 (file)
@@ -55,7 +55,7 @@
 #define IME_DEVICE_NAME "ime"
 
 #define HIDE_TIMER_INTERVAL     0.05
-#define WAIT_FOR_FILTER_DONE_SECOND 2
+#define WAIT_FOR_FILTER_DONE_SECOND 1.3
 
 #define MOD_SHIFT_MASK      0x01
 #define MOD_CAPS_MASK       0x02
@@ -3375,6 +3375,11 @@ wayland_im_context_filter_event(Ecore_IMF_Context    *ctx,
                             break;
                     }
 
+                    if (ecore_time_get() - start_time > WAIT_FOR_FILTER_DONE_SECOND) {
+                        LOGE("Key processing result not received");
+                        ret = EINA_FALSE;
+                    }
+
                     if (imcontext->last_key_event_filter.serial < serial) {
                         LOGW("Timeout occured");
                         ret = EINA_TRUE;