e_keyrouter: retrun false in an intercept hook if only an one hook returns false 59/242459/2
authorjeon <jhyuni.kang@samsung.com>
Thu, 27 Aug 2020 05:48:56 +0000 (14:48 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 27 Aug 2020 07:31:08 +0000 (07:31 +0000)
Change-Id: Idc9843e852c58eb4523e20924cc70c3d6cce298d

src/bin/e_keyrouter.c

index cac1ef6279e27f01997f16a66b41b7bc49e3f71a..765923b5874f61b28ab9f349ebf64396936022a8 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