e_client: use E_ZONE_CLIENT_FOREACH 10/322410/2
authorSooChan Lim <sc1.lim@samsung.com>
Mon, 7 Apr 2025 09:31:21 +0000 (18:31 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Wed, 9 Apr 2025 00:45:28 +0000 (00:45 +0000)
use E_ZONE_CLIENT_FOREACh instead of using ec_list to
traverse all e_clients

Change-Id: Id3915672aa7397ddda461aa94d96456b93024cd9

src/bin/core/e_client.c

index 8f5f55415fc4a715cd51c43143ad99db3790ed05..232227f5c27d5aed1ea644f4e6d39c78c3078db7 100644 (file)
@@ -2709,9 +2709,7 @@ EINTERN void
 e_client_idler_before(Eina_Bool *check_focus)
 {
    E_Zone *zone;
-   const Eina_List *l;
    E_Client *ec;
-   Eina_List *ec_list;
 
    *check_focus = EINA_FALSE;
 
@@ -2719,35 +2717,36 @@ e_client_idler_before(Eina_Bool *check_focus)
 
    TRACE_DS_BEGIN(CLIENT:IDLE BEFORE);
 
-   ec_list = e_comp_ec_list_get();
-   EINA_LIST_FOREACH(ec_list, l, ec)
-     {
-        // pass 1 - eval0. fetch properties on new or on change and
-        // call hooks to decide what to do - maybe move/resize
-        if (ec->ignored || (!ec->changed)) continue;
+   E_COMP_ZONE_FOREACH(zone)
+     E_ZONE_CLIENT_FOREACH(zone, ec)
+       {
+          // pass 1 - eval0. fetch properties on new or on change and
+          // call hooks to decide what to do - maybe move/resize
+          if (ec->ignored || (!ec->changed)) continue;
 
-        e_policy_stack_transient_for_fetch(ec);
-        if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_FETCH, ec)) continue;
+          e_policy_stack_transient_for_fetch(ec);
+          if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_FETCH, ec)) continue;
 
-        /* FETCH is hooked by the compositor to get client hints */
-        if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_FETCH, ec)) continue;
+          /* FETCH is hooked by the compositor to get client hints */
+          if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_FETCH, ec)) continue;
 
-        if (ec->new_client)
-          {
-             e_client_type_update(ec);
-          }
+          if (ec->new_client)
+            {
+               e_client_type_update(ec);
+            }
 
-        /* PRE_POST_FETCH calls e_remember apply for new client */
-        e_policy_wl_notification_level_fetch(ec);
-        if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_POST_FETCH, ec)) continue;
+          /* PRE_POST_FETCH calls e_remember apply for new client */
+          e_policy_wl_notification_level_fetch(ec);
+          if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_POST_FETCH, ec)) continue;
 
-        e_policy_client_evaluation(ec);
-        if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_FETCH, ec)) continue;
+          e_policy_client_evaluation(ec);
+          if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_FETCH, ec)) continue;
 
-        if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_FRAME_ASSIGN, ec)) continue;
+          if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_FRAME_ASSIGN, ec)) continue;
+
+          _e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_FRAME_ASSIGN, ec);
+       }
 
-        _e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_FRAME_ASSIGN, ec);
-     }
    // pass 2 - show and hide windows needing hide and eval (main eval)
    E_COMP_ZONE_FOREACH(zone)
      E_ZONE_CLIENT_FOREACH(zone, ec)