Reduce the wait time for key processing to prevent deadlock 87/226987/1
authorInHong Han <inhong1.han@samsung.com>
Mon, 9 Mar 2020 01:58:41 +0000 (10:58 +0900)
committerInHong Han <inhong1.han@samsung.com>
Mon, 9 Mar 2020 01:58:41 +0000 (10:58 +0900)
Change-Id: I0767287e996b870e4ec70cc25f9250907f584186

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 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
 
 #define MOD_SHIFT_MASK      0x01
 #define MOD_CAPS_MASK       0x02
@@ -3375,6 +3375,11 @@ wayland_im_context_filter_event(Ecore_IMF_Context    *ctx,
                             break;
                     }
 
                             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;
                     if (imcontext->last_key_event_filter.serial < serial) {
                         LOGW("Timeout occured");
                         ret = EINA_TRUE;