e_keyrouter: retrun false in an intercept hook if only an one hook returns false 65/242465/1 accepted/tizen/5.5/unified/20200830.234028 submit/tizen_5.5/20200827.073826
authorjeon <jhyuni.kang@samsung.com>
Thu, 27 Aug 2020 05:48:56 +0000 (14:48 +0900)
committerJeongHyun Kang <jhyuni.kang@samsung.com>
Thu, 27 Aug 2020 05:49:11 +0000 (05:49 +0000)
Change-Id: Idc9843e852c58eb4523e20924cc70c3d6cce298d

src/bin/e_keyrouter.c

index 68434e9520a50f827e99a3b2a2c766efafb44d14..58ca3a85a60f7d7f70301176278776b1363a8971 100644 (file)
@@ -69,19 +69,20 @@ E_API Eina_Bool
 e_keyrouter_intercept_hook_call(E_Keyrouter_Intercept_Hook_Point hookpoint, int type, Ecore_Event_Key *event)
 {
    E_Keyrouter_Intercept_Hook *ch;
-   Eina_Bool res = EINA_TRUE;
+   Eina_Bool res = EINA_TRUE, ret = EINA_TRUE;
 
    _e_keyrouter_intercept_hooks_walking++;
    EINA_INLIST_FOREACH(_e_keyrouter_intercept_hooks[hookpoint], ch)
      {
         if (ch->delete_me) continue;
         res = ch->func(ch->data, type, event);
+        if (!res) ret = EINA_FALSE;
      }
    _e_keyrouter_intercept_hooks_walking--;
    if ((_e_keyrouter_intercept_hooks_walking == 0) && (_e_keyrouter_intercept_hooks_delete > 0))
      _e_keyrouter_intercept_hooks_clean();
 
-   return res;
+   return ret;
 }
 
 static void