add e_client_raise/e_client_lower functions 23/215423/2
authorDoyoun Kang <doyoun.kang@samsung.com>
Tue, 8 Oct 2019 04:39:21 +0000 (13:39 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Tue, 8 Oct 2019 04:49:30 +0000 (13:49 +0900)
we added e_client_raise and e_client_lower functions.
and we replaced code to e_client_raise/lower from evas_object_raise/lower.

Change-Id: Ia649e4528f0e7b9a91242f97cd7ade8acc4ca909

14 files changed:
src/bin/e_actions.c
src/bin/e_client.c
src/bin/e_client.h
src/bin/e_comp_wl_shell.c
src/bin/e_desk.c
src/bin/e_focus.c
src/bin/e_policy_softkey.c
src/bin/e_policy_stack.c
src/bin/e_policy_visibility.c
src/bin/e_policy_wl.c
src/bin/e_slot.c
src/bin/e_test_helper.c
src/bin/e_win.c
src/bin/services/e_service_cbhm.c

index 625720cb267a0a466a40caf37cd9e301782c8537..7e399fa6b11da32df63ebf44efec68c455ee19e3 100644 (file)
@@ -259,7 +259,7 @@ ACT_FN_GO(window_raise, EINA_UNUSED)
         if (!obj) return;
      }
    if (!((E_Client *)obj)->lock_user_stacking)
-     evas_object_raise(((E_Client *)obj)->frame);
+     e_client_raise(((E_Client *)obj));
 }
 
 /***************************************************************************/
@@ -273,7 +273,7 @@ ACT_FN_GO(window_lower, EINA_UNUSED)
         if (!obj) return;
      }
    if (!((E_Client *)obj)->lock_user_stacking)
-     evas_object_lower(((E_Client *)obj)->frame);
+     e_client_lower(((E_Client *)obj));
 }
 
 /***************************************************************************/
@@ -1187,7 +1187,7 @@ window_jump_to(const char *params)
           e_client_uniconify(ec);
 
 
-        evas_object_raise(ec->frame);
+        e_client_raise(ec);
         if (ec->zone != current_zone)
           e_util_pointer_center(ec);
         if (e_config->focus_policy_ext != E_FOCUS_EXT_TOP_STACK)
@@ -1279,7 +1279,7 @@ ACT_FN_GO(window_desk_move_by, )
              /* switch desktop. Quite useful from the interface point of view. */
              e_zone_desk_flip_by(ec->zone, to_x - dx, to_y - dy);
              if (!ec->lock_user_stacking)
-               evas_object_raise(ec->frame);
+               e_client_raise(ec);
           }
      }
 }
index b18ad89fdd7072de1acf35e024774d27baae887b..71476f138a574c24cd5a70ce45d4d04ef81bdcd4 100644 (file)
@@ -912,7 +912,7 @@ _e_client_revert_focus_get(E_Client *ec)
         // set parent focus
         focus_ec = ec->parent;
         if (e_config->raise_on_revert_focus)
-          evas_object_raise(ec->parent->frame);
+          e_client_raise(ec->parent);
      }
    else if (e_config->focus_policy == E_FOCUS_MOUSE)
      {
@@ -1421,7 +1421,7 @@ _e_client_move_begin(E_Client *ec)
    if (!ec->lock_user_stacking)
      {
         if (e_config->border_raise_on_mouse_action)
-          evas_object_raise(ec->frame);
+          e_client_raise(ec);
      }
 
    if (e_comp->hwc)
@@ -1962,7 +1962,7 @@ _e_client_reset_lost_window(E_Client *ec)
    if (ec->iconic) e_client_uniconify(ec);
    if (!ec->moving) e_comp_object_util_center(ec->frame);
 
-   evas_object_raise(ec->frame);
+   e_client_raise(ec);
    if (!ec->lock_focus_out)
      {
         if (e_config->focus_policy_ext != E_FOCUS_EXT_TOP_STACK)
@@ -2816,7 +2816,7 @@ _e_client_eval(E_Client *ec)
                   e_object_ref(E_OBJECT(ec->cur_mouse_action));
                   ec->cur_mouse_action->func.go(E_OBJECT(ec), NULL);
                   if (e_config->border_raise_on_mouse_action)
-                    evas_object_raise(ec->frame);
+                    e_client_raise(ec);
                   if (e_config->focus_policy_ext != E_FOCUS_EXT_TOP_STACK)
                     {
                        ELOGF("FOCUS", "focus set   | client eval", ec);
@@ -5463,7 +5463,7 @@ e_client_activate(E_Client *ec, Eina_Bool just_do_it)
              e_desk_show(ec->desk);
           }
         if (!ec->lock_user_stacking)
-          evas_object_raise(ec->frame);
+          e_client_raise(ec);
         if (ec->shaded || ec->shading)
           e_client_unshade(ec, ec->shade_dir);
         if (!ec->lock_focus_out)
@@ -5997,7 +5997,7 @@ e_client_uniconify(E_Client *ec)
      }
 
    if (!not_raise)
-     evas_object_raise(ec->frame);
+     e_client_raise(ec);
 
    if (ec->internal)
      {
@@ -6497,7 +6497,7 @@ e_client_resize_begin(E_Client *ec)
    if (!ec->lock_user_stacking)
      {
         if (e_config->border_raise_on_mouse_action)
-          evas_object_raise(ec->frame);
+          e_client_raise(ec);
      }
 
    if (e_comp->hwc)
@@ -7627,3 +7627,17 @@ e_client_layer_set(E_Client *ec,
 
    return EINA_TRUE;
 }
+
+E_API void
+e_client_raise(E_Client *ec)
+{
+   if (!ec) return;
+   evas_object_raise(ec->frame);
+}
+
+E_API void
+e_client_lower(E_Client *ec)
+{
+   if (!ec) return;
+   evas_object_lower(ec->frame);
+}
index b4ae0729c854e851b119e94642fd2dcdf71f1ecb..5e8964c1ce915208c46921afca009436cc206b64 100644 (file)
@@ -1195,6 +1195,8 @@ EINTERN Eina_Bool e_client_pending_geometry_has(E_Client *ec);
 E_API void e_client_frame_focus_set(E_Client *ec, Eina_Bool focus);
 
 E_API Eina_Bool e_client_layer_set(E_Client *ec, E_Layer layer);
+E_API void      e_client_raise(E_Client *ec);
+E_API void      e_client_lower(E_Client *ec);
 
 /**
  * Move window to coordinates that do not account client decorations yet.
index 021fba9998bf38f73997f59485cbba81945dadee..26be56eb8419e17b27cfc04edf62e2a4080e4e91 100644 (file)
@@ -768,12 +768,12 @@ _e_shell_client_map_common_post(E_Client *ec)
              if (ec->post_lower)
                {
                   ELOGF("SHELL", "lower called by post lower flag", ec);
-                  evas_object_lower(ec->frame);
+                  e_client_lower(ec);
                }
              else if (ec->post_raise)
                {
                   ELOGF("SHELL", "raise called by post raise flag", ec);
-                  evas_object_raise(ec->frame);
+                  e_client_raise(ec);
                }
 
              ec->post_lower = EINA_FALSE;
index 041ca629afd533224e5d5dfa81f91e25b6acf2aa..326683f8e1dca812df7f98b91b394c1f24853cd7 100644 (file)
@@ -464,7 +464,7 @@ e_desk_last_focused_focus(E_Desk *desk)
                   else
                     e_client_focus_set_with_pointer(ec);
                   if (e_config->raise_on_revert_focus)
-                    evas_object_raise(ec->frame);
+                    e_client_raise(ec);
                   return ec;
                }
           }
@@ -476,7 +476,7 @@ e_desk_last_focused_focus(E_Desk *desk)
         else
           e_client_focus_set_with_pointer(ecs);
         if (e_config->raise_on_revert_focus)
-          evas_object_raise(ecs->frame);
+          e_client_raise(ecs);
         return ecs;
      }
 
@@ -757,7 +757,7 @@ e_desk_flip_end(E_Desk *desk)
                    e_client_frame_focus_set(ec, EINA_TRUE);
                 }
               if (e_config->raise_on_revert_focus)
-                evas_object_raise(ec->frame);
+                e_client_raise(ec);
               return;
            }
      }
index 5151afde1fe68838ccf5a0676f6f1bfdf5e015d8..7df5f7894716f6cf63b5a6e0434b33a0272c7560 100644 (file)
@@ -20,7 +20,7 @@ e_focus_event_mouse_in(E_Client *ec)
    if (e_config->use_auto_raise)
      {
         if (!ec->lock_user_stacking)
-          evas_object_raise(ec->frame);
+          e_client_raise(ec);
      }
 }
 
@@ -56,12 +56,12 @@ e_focus_event_mouse_down(E_Client *ec)
           }
 
         if (ec->floating)
-          evas_object_raise(ec->frame);
+          e_client_raise(ec);
      }
    if (e_config->always_click_to_raise)
      {
         if (!ec->lock_user_stacking)
-          evas_object_raise(ec->frame);
+          e_client_raise(ec);
      }
 }
 
index 06e9d839a47f81c73dc78822170f5062f6825bbb..c5be16151bf7fcc7781ec994da41ec986bd237fc 100644 (file)
@@ -46,12 +46,12 @@ _e_policy_softkey_iconify(E_Zone *zone, Eina_Bool all)
 
         if (e_policy_client_is_home_screen(ec))
           {
-             evas_object_raise(ec->frame);
+             e_client_raise(ec);
              return;
           }
         if (!all)
           {
-             evas_object_lower(ec->frame);
+             e_client_lower(ec);
              return;
           }
      }
index e1c3af7b5dfa7fb0feced037c664a5ed8045953c..f1117969c084a23289bb58b67c9c26e20ab460c9 100644 (file)
@@ -532,7 +532,7 @@ e_policy_stack_clients_restack_above_lockscreen(E_Client *ec_lock, Eina_Bool sho
 
                   ELOGF("CHANGE to Lockscreen layer", "AboveLock|layer: %d -> %d", ec, ec->layer, lock_layer);
                   if (ec->layer == lock_layer)
-                    evas_object_raise(ec->frame);
+                    e_client_raise(ec);
                   else
                     evas_object_layer_set(ec->frame, lock_layer);
 
@@ -570,7 +570,7 @@ e_policy_stack_check_above_lockscreen(E_Client *ec, E_Layer layer, E_Layer *new_
                {
                   ELOGF("CHANGE to Lockscreen layer", "AboveLock|layer: %d -> %d", ec, ec->layer, lock_layer);
                   if (ec->layer == lock_layer)
-                    evas_object_raise(ec->frame);
+                    e_client_raise(ec);
                   else
                     e_client_layer_set(ec, lock_layer);
                }
index c8a5de6c820c9185b779d51f8af2e5855e2866fc..fddcf81dbce1c4b70b8c0b307d7cfcc02d3ea8c2 100644 (file)
@@ -1593,7 +1593,7 @@ _e_vis_ec_job_exec(E_Client *ec, E_Vis_Job_Type type)
          e_comp_canvas_norender_pop();
          if (ec)
            {
-              evas_object_lower(ec->frame);
+              e_client_lower(ec);
               if (ec->focused)
                 e_client_revert_focus(ec);
            }
index 30cc649fda0b1a2abe83a0371c281b85fe088640..500cc8c57c2099a8db65bcb8be2274a4d38f097f 100644 (file)
@@ -1492,7 +1492,7 @@ e_policy_wl_activate(E_Client *ec)
           }
      }
    else
-     evas_object_raise(ec->frame);
+     e_client_raise(ec);
 
    if (e_policy_client_is_lockscreen(ec))
      {
@@ -1710,7 +1710,7 @@ _tzpol_iface_cb_raise(struct wl_client *client EINA_UNUSED, struct wl_resource *
 
    e_policy_hook_call(E_POLICY_HOOK_CLIENT_RAISE_REQ, ec);
 
-   evas_object_raise(ec->frame);
+   e_client_raise(ec);
 
    if ((ec->comp_data) && (!ec->comp_data->mapped))
      {
@@ -1743,7 +1743,7 @@ _tzpol_iface_cb_lower(struct wl_client *client EINA_UNUSED, struct wl_resource *
         e_client_post_raise_lower_set(ec, EINA_FALSE, EINA_TRUE);
      }
 
-   evas_object_lower(ec->frame);
+   e_client_lower(ec);
 
    if (ec->focused)
      e_client_revert_focus(ec);
@@ -1759,7 +1759,7 @@ _tzpol_iface_cb_lower_by_res_id(struct wl_client *client EINA_UNUSED, struct wl_
    EINA_SAFETY_ON_NULL_RETURN(ec->frame);
 
    ELOGF("TZPOL", "LOWER by res id:%d", ec, res_id);
-   evas_object_lower(ec->frame);
+   e_client_lower(ec);
 
    if ((ec->comp_data) && (!ec->comp_data->mapped))
      {
@@ -6271,7 +6271,7 @@ _tzlaunch_splash_iface_cb_owner(struct wl_client *client EINA_UNUSED, struct wl_
                }
 
              evas_object_show(new_ec->frame);
-             evas_object_raise(new_ec->frame);
+             e_client_raise(new_ec);
 
              tzlaunch_splash->ec = new_ec;
              tzlaunch_splash->replaced = EINA_TRUE;
@@ -6315,7 +6315,7 @@ _tzlaunch_splash_iface_cb_owner(struct wl_client *client EINA_UNUSED, struct wl_
           }
 
         evas_object_show(old_ec->frame);
-        evas_object_raise(old_ec->frame);
+        e_client_raise(old_ec);
      }
 
    EC_CHANGED(tzlaunch_splash->ec);
index 6f7dd4c5d2bc7f11c4723215e742277a4a928887..5f05f6d6a63fab8fc3ece37230ee3dccc660ee89 100644 (file)
@@ -359,7 +359,7 @@ e_slot_raise(Evas_Object *obj)
    EINA_LIST_FREE(l, ec2)
      {
         ELOGF("SLOT", "e_slot_raise |raise ec - id:%d [cnt:%d]pid:%d", ec2, sd->id, cnt++, ec2->netwm.pid);
-        if (top_ec == ec2) evas_object_raise(ec2->frame);
+        if (top_ec == ec2) e_client_raise(ec2);
         else evas_object_stack_below(ec2->frame, below_ec->frame);
         below_ec = ec2;
      }
@@ -395,7 +395,7 @@ e_slot_lower(Evas_Object *obj)
    EINA_LIST_FREE(l, ec2)
      {
         ELOGF("SLOT", "e_slot_lower |lower ec - id:%d [cnt:%d]", ec2, sd->id, cnt++);
-        evas_object_lower(ec2->frame);
+        e_client_lower(ec2);
      }
 
    if (sd->parent_obj)
@@ -422,7 +422,7 @@ e_slot_focus_set(Evas_Object *obj)
         if (e_client_util_ignored_get(ec)) continue;
         if (ec->layout.s_id != sd->id) continue;
         ELOGF("SLOT", "e_slot_focus_set |ec foucsed set - id:%d [cnt:%d]", ec, sd->id, cnt++);
-        if (ec->frame) evas_object_raise(ec->frame);
+        e_client_raise(ec);
         break;
      }
 }
index 1cf26ca890ca295ac717cf7ff2bb71e64f91f017..735f8d170325c6f6549460c03f070e778698600d 100644 (file)
@@ -412,9 +412,9 @@ _e_test_helper_restack(Ecore_Window win, Ecore_Window target, int above)
    if(!tec)
      {
         if (above)
-          evas_object_raise(ec->frame);
+          e_client_raise(ec);
         else
-          evas_object_lower(ec->frame);
+          e_client_lower(ec);
      }
    else
      {
index 3e83a8016619789f06f71ddfd631b5f2035b9f0c..cb71975ef029474333c23f385563b40cae19482d 100644 (file)
@@ -207,7 +207,7 @@ _e_elm_win_trap_lower(void *data, Evas_Object *o EINA_UNUSED)
    Elm_Win_Trap_Ctx *ctx = data;
    EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
    if (!ctx->client) return EINA_TRUE;
-   evas_object_lower(ctx->client->frame);
+   e_client_lower(ctx->client);
    return EINA_FALSE;
 }
 
@@ -217,7 +217,7 @@ _e_elm_win_trap_raise(void *data, Evas_Object *o EINA_UNUSED)
    Elm_Win_Trap_Ctx *ctx = data;
    EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
    if (!ctx->client) return EINA_TRUE;
-   evas_object_raise(ctx->client->frame);
+   e_client_raise(ctx->client);
    return EINA_FALSE;
 }
 
@@ -229,7 +229,7 @@ _e_elm_win_trap_activate(void *data, Evas_Object *o EINA_UNUSED)
    if (!ctx->client) return EINA_TRUE;
    evas_object_focus_set(ctx->client->frame, 1);
    if (!ctx->client->lock_user_stacking)
-     evas_object_raise(ctx->client->frame);
+     e_client_raise(ctx->client);
    return EINA_FALSE;
 }
 
index 16f35a3502ebdf71c846f8370fdbbfb0fbb82b5d..13ebc39f78f551940a6a2e25575fc4b7f48a0c92 100644 (file)
@@ -122,7 +122,7 @@ _e_cbhm_vis_change(E_Policy_Cbhm *cbhm, Eina_Bool vis)
           {
              ec->visible = EINA_TRUE;
              evas_object_show(ec->frame);
-             evas_object_raise(ec->frame);
+             e_client_raise(ec);
           }
 
         e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
@@ -137,7 +137,7 @@ _e_cbhm_vis_change(E_Policy_Cbhm *cbhm, Eina_Bool vis)
              e_policy_wl_iconify_state_change_send(ec, 1);
              ec->exp_iconify.by_client = 0;
              e_client_iconify(ec);
-             evas_object_lower(ec->frame);
+             e_client_lower(ec);
           }
      }