e_focus_policy_topmost: implement comp_object_lower callback 46/297546/1
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 10 Aug 2023 07:14:13 +0000 (16:14 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 21 Aug 2023 07:58:39 +0000 (16:58 +0900)
Add the code at the hooks call of E_COMP_OBJECT_HOOK_LOWER.

Change-Id: I576cde35c8ccf496f5d1b7b90e2066c21ab78402

src/bin/e_focus_policy_topmost.c

index 7967770..9d13e31 100644 (file)
@@ -312,7 +312,19 @@ _focus_policy_topmost_hook_cb_client_eval_end(void *data, E_Client *ec)
 static Eina_Bool
 _focus_policy_hook_topmost_cb_comp_object_lower(void *data, E_Client *ec)
 {
-   // TODO:
+   E_Focus_Policy_Topmost *topmost_policy;
+
+   topmost_policy = (E_Focus_Policy_Topmost *)data;
+   if (!topmost_policy) return EINA_TRUE;
+
+   // no need to change the focused ec when ec is not focused.
+   if (!ec->focused) return EINA_TRUE;
+
+   // no need to change the focused ec when calc_vis_without_effect is not set.
+   if (e_config->calc_vis_without_effect) return EINA_TRUE;
+
+   // find the next focus and set it
+   _focus_policy_topmost_next_focus_set(topmost_policy);
 
    return EINA_TRUE;
 }