From a22e141ddf17ed03ebb24b639bb6b4f6a0d04442 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Mon, 28 Aug 2023 20:22:23 +0900 Subject: [PATCH] e_client: use e_desk_has_ec instead of e_client_util_desk_visible and remove e_client_util_desk_visible. Change-Id: Idbe4e96928282e57dc909f1c46387d9c7a344607 --- src/bin/e_client.c | 6 +++--- src/bin/e_client.h | 7 ------- src/bin/e_desk.c | 4 ++-- src/bin/e_desk.h | 2 +- src/bin/e_main.c | 2 +- src/bin/e_policy_softkey.c | 2 +- 6 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 6a19df9..8683dad 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -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; diff --git a/src/bin/e_client.h b/src/bin/e_client.h index 92421bc..0b54fd5 100644 --- a/src/bin/e_client.h +++ b/src/bin/e_client.h @@ -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) { diff --git a/src/bin/e_desk.c b/src/bin/e_desk.c index 9a9dce3..c3342e6 100644 --- a/src/bin/e_desk.c +++ b/src/bin/e_desk.c @@ -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; } diff --git a/src/bin/e_desk.h b/src/bin/e_desk.h index af4cbf0..406979e 100644 --- a/src/bin/e_desk.h +++ b/src/bin/e_desk.h @@ -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); diff --git a/src/bin/e_main.c b/src/bin/e_main.c index 7c5ef94..97bad01 100644 --- a/src/bin/e_main.c +++ b/src/bin/e_main.c @@ -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; diff --git a/src/bin/e_policy_softkey.c b/src/bin/e_policy_softkey.c index 98b1a82..b45263e 100644 --- a/src/bin/e_policy_softkey.c +++ b/src/bin/e_policy_softkey.c @@ -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)) -- 2.7.4