e_client: use e_desk_has_ec instead of e_client_util_desk_visible 30/298230/1
authorSooChan Lim <sc1.lim@samsung.com>
Mon, 28 Aug 2023 11:22:23 +0000 (20:22 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 4 Sep 2023 02:36:42 +0000 (11:36 +0900)
and remove e_client_util_desk_visible.

Change-Id: Idbe4e96928282e57dc909f1c46387d9c7a344607

src/bin/e_client.c
src/bin/e_client.h
src/bin/e_desk.c
src/bin/e_desk.h
src/bin/e_main.c
src/bin/e_policy_softkey.c

index 6a19df9..8683dad 100644 (file)
@@ -1844,7 +1844,7 @@ _e_client_under_pointer_helper(E_Desk *desk, E_Client *exclude, int x, int y)
      {
         /* If a border was specified which should be excluded from the list
          * (because it will be closed shortly for example), skip */
-        if (e_client_util_ignored_get(cec) || (!e_client_util_desk_visible(cec, desk))) continue;
+        if (e_client_util_ignored_get(cec) || (!e_desk_has_ec(desk, cec))) continue;
         if (!evas_object_visible_get(cec->frame)) continue;
         if (e_policy_client_is_cursor(cec)) continue;
         if ((exclude) && (cec == exclude)) continue;
@@ -1867,7 +1867,7 @@ _e_client_input_rect_under_pointer_helper(E_Desk *desk, E_Client *exclude, int x
      {
         /* If a border was specified which should be excluded from the list
          * (because it will be closed shortly for example), skip */
-        if (e_client_util_ignored_get(cec) || (!e_client_util_desk_visible(cec, desk))) continue;
+        if (e_client_util_ignored_get(cec) || (!e_desk_has_ec(desk, cec))) continue;
         if (!evas_object_visible_get(cec->frame)) continue;
         if (e_policy_client_is_cursor(cec)) continue;
         if ((exclude) && (cec == exclude)) continue;
@@ -2463,7 +2463,7 @@ _e_client_eval(E_Client *ec)
 #else
    zone = e_comp_zone_find_by_ec(ec);
    if ((!ec->input_only) && (!ec->iconic) &&
-       ((!zone) || e_client_util_desk_visible(ec, e_desk_current_get(zone))) &&
+       ((!zone) || e_desk_has_ec(e_desk_current_get(zone), ec)) &&
        ((ec->take_focus) || (ec->want_focus)))
      {
         ec->take_focus = 0;
index 92421bc..0b54fd5 100644 (file)
@@ -1433,13 +1433,6 @@ e_client_util_ignored_get(const E_Client *ec)
    return ec->override || ec->input_only || ec->ignored;
 }
 
-static inline Eina_Bool
-e_client_util_desk_visible(const E_Client *ec, const E_Desk *desk)
-{
-   if (!ec) return EINA_FALSE;
-   return !ec->desk || ec->sticky || (ec->desk == desk);
-}
-
 static inline Ecore_Window
 e_client_util_pwin_get(const E_Client *ec)
 {
index 9a9dce3..c3342e6 100644 (file)
@@ -199,7 +199,7 @@ e_desk_new(E_Zone *zone, int x, int y)
 }
 
 EINTERN E_Client *
-e_desk_client_top_visible_get(const E_Desk *desk)
+e_desk_client_top_visible_get(E_Desk *desk)
 {
    E_Client *ec;
 
@@ -207,7 +207,7 @@ e_desk_client_top_visible_get(const E_Desk *desk)
    E_OBJECT_TYPE_CHECK_RETURN(desk, E_DESK_TYPE, NULL);
 
    E_CLIENT_REVERSE_FOREACH(ec)
-     if (e_client_util_desk_visible(ec, desk) && evas_object_visible_get(ec->frame)) return ec;
+     if (e_desk_has_ec(desk, ec) && evas_object_visible_get(ec->frame)) return ec;
    return NULL;
 }
 
index af4cbf0..406979e 100644 (file)
@@ -117,7 +117,7 @@ EINTERN void         e_desk_name_del(int zone, int desk_x, int desk_y);
 EINTERN void         e_desk_name_update(void);
 EINTERN void         e_desk_show(E_Desk *desk);
 EINTERN void         e_desk_deskshow(E_Zone *zone);
-EINTERN E_Client    *e_desk_client_top_visible_get(const E_Desk *desk);
+EINTERN E_Client    *e_desk_client_top_visible_get(E_Desk *desk);
 E_API E_Desk      *e_desk_current_get(E_Zone *zone);
 EINTERN E_Desk      *e_desk_at_xy_get(E_Zone *zone, int x, int y);
 EINTERN E_Desk      *e_desk_at_pos_get(E_Zone *zone, int pos);
index 7c5ef94..97bad01 100644 (file)
@@ -1150,7 +1150,7 @@ _e_main_desk_restore(void)
    E_CLIENT_REVERSE_FOREACH(ec)
      {
         zone = e_comp_zone_find_by_ec(ec);
-        if ((!e_client_util_ignored_get(ec)) && e_client_util_desk_visible(ec, e_desk_current_get(zone)))
+        if ((!e_client_util_ignored_get(ec)) && e_desk_has_ec(e_desk_current_get(zone), ec))
           {
              ec->want_focus = ec->take_focus = 1;
              break;
index 98b1a82..b45263e 100644 (file)
@@ -38,7 +38,7 @@ _e_policy_softkey_iconify(E_Zone *zone, Eina_Bool all)
    E_CLIENT_REVERSE_FOREACH(ec)
      {
         if (e_client_util_ignored_get(ec)) continue;
-        if (!e_client_util_desk_visible(ec, desk)) continue;
+        if (!e_desk_has_ec(desk, ec)) continue;
         if (!evas_object_visible_get(ec->frame)) continue;
 
         if ((launcher) && (launcher->ec == ec))