From bb8e727c1a0d539bc179bf274096abf42ce107b6 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Thu, 29 Oct 2020 09:54:00 +0900 Subject: [PATCH] e_client: use e_client_mapped_get() instead of cdata->mapped. use e_client_mapped_get() api to avoid the direct access of ec->cdata->mapped Change-Id: If3def60bcd4e6bedd371b6c5cc53885cf61652cd --- src/bin/e_client.c | 17 +++------- src/bin/e_comp_object.c | 4 +-- src/bin/e_comp_wl.c | 16 +++++----- src/bin/e_comp_wl_capture.c | 5 +-- src/bin/e_comp_wl_shell.c | 22 +++---------- src/bin/e_comp_wl_subsurface.c | 8 ++--- src/bin/e_info_server.c | 6 ++-- src/bin/e_output.c | 2 +- src/bin/e_plane_renderer.c | 2 +- src/bin/e_policy_visibility.c | 45 +++++++-------------------- src/bin/e_policy_wl.c | 30 +++++------------- src/bin/services/e_service_cbhm.c | 4 +-- src/bin/services/e_service_launcher.c | 7 ++--- 13 files changed, 51 insertions(+), 117 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 218f90d2d2..d59c93f8b6 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -2258,7 +2258,6 @@ static void _e_client_cb_evas_restack(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { E_Client *ec = data; - E_Comp_Wl_Client_Data *child_cdata = NULL; if (e_object_is_del(data)) return; if (ec->layer_block) return; @@ -2273,8 +2272,7 @@ _e_client_cb_evas_restack(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA /* Don't stack vkbd if parent is splitted */ if (child->vkbd.vkbd && ec->layout.splited) continue; - child_cdata = e_client_cdata_get(child); - if (child_cdata && !child_cdata->mapped) + if (!e_client_mapped_get(child)) { ELOGF("COMP", "STACK CHANGE CHILD. BUT not mapped. skip. child(ec:%p, win:0x%08zx)", ec, child, e_client_util_win_get(child)); continue; @@ -3396,7 +3394,7 @@ _e_client_visibility_zone_calculate(E_Zone *zone) } else { - if (cdata && !cdata->mapped) + if (!e_client_mapped_get(ec)) { EC_IS_NOT_VISIBLE continue; calc_region = EINA_FALSE; @@ -6098,8 +6096,6 @@ e_client_iconify(E_Client *ec) E_OBJECT_CHECK(ec); E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE); - E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec); - ELOGF("TZVIS", "ICONIFY |iconic:%d |argb:%d |not_raise:%d |by_client:%d", ec, ec->iconic, ec->argb, (unsigned int)ec->exp_iconify.not_raise, ec->exp_iconify.by_client); @@ -6108,7 +6104,7 @@ e_client_iconify(E_Client *ec) if (ec->shading || ec->iconic) return; if (ec->exp_iconify.skip_iconify && !ec->exp_iconify.by_client) return; if (ec->exp_iconify.skip_by_remote) return; - if (!cdata || !cdata->mapped) + if (!e_client_mapped_get(ec)) { if (!ec->exp_iconify.by_client) { @@ -6159,12 +6155,9 @@ e_client_uniconify(E_Client *ec) E_OBJECT_CHECK(ec); E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE); - E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec); - ELOGF("TZVIS", "UNICONIFY|iconic:%d |argb:%d |not_raise:%d |by_client:%d |mapped:%d", ec, ec->iconic, ec->argb, (unsigned int)ec->exp_iconify.not_raise, - ec->exp_iconify.by_client, - cdata ? cdata->mapped : 0); + ec->exp_iconify.by_client, e_client_mapped_get(ec)); if (!ec->zone) return; if (ec->shading || (!ec->iconic)) return; @@ -6203,7 +6196,7 @@ e_client_uniconify(E_Client *ec) if (ec->pixmap && e_pixmap_usable_get(ec->pixmap)) { - if (cdata && cdata->mapped) + if (e_client_mapped_get(ec)) { ELOGF("TZVIS", "UNICONIFY|object show", ec); evas_object_show(ec->frame); diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index abc9ad9a35..37c242361b 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -1751,7 +1751,6 @@ _e_comp_intercept_layer_set(void *data, Evas_Object *obj, int layer) { E_Comp_Object *cw = data; E_Comp_Wl_Client_Data *cdata = NULL; - E_Comp_Wl_Client_Data *child_cdata = NULL; unsigned int l = e_comp_canvas_layer_map(layer); int oldraise; @@ -1829,8 +1828,7 @@ layer_set: e_config->transient.raise = 1; EINA_LIST_FREE(list, child) { - child_cdata = e_client_cdata_get(child); - if (child_cdata && !child_cdata->mapped) + if (!e_client_mapped_get(child)) { ELOGF("COMP", "LAYER_SET CHILD. BUT not mapped. skip. child(ec:%p, win:0x%08zx)", cw->ec, child, e_client_util_win_get(child)); continue; diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index a9aa5e4f26..65ae5cae37 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -627,7 +627,7 @@ _e_comp_wl_evas_cb_hide(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EIN * So if this client evas object is hidden state and client is already * unmmapped, we can consider to clear pixmap image here mandatorily. */ - if (!cdata->mapped) + if (!e_client_mapped_get(ec)) e_pixmap_image_clear(ec->pixmap, 1); EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp) @@ -2595,7 +2595,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) if (!e_pixmap_usable_get(ec->pixmap)) { /* unmap ec */ - if (cdata->mapped) + if (e_client_mapped_get(ec)) { if ((cdata->shell.surface) && (cdata->shell.unmap)) @@ -2637,7 +2637,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) else { /* map ec */ - if (!cdata->mapped) + if (!e_client_mapped_get(ec)) { if ((cdata->shell.surface) && (cdata->shell.map) && @@ -2906,7 +2906,7 @@ _e_comp_wl_surface_cb_attach(struct wl_client *client EINA_UNUSED, struct wl_res } } - if (!cdata->mapped) + if (!e_client_mapped_get(ec)) { if (cdata->shell.surface && !ec->internal && !cdata->sub.data && !ec->remote_surface.provider) @@ -2917,7 +2917,7 @@ _e_comp_wl_surface_cb_attach(struct wl_client *client EINA_UNUSED, struct wl_res if (!buffer) { - if (cdata->mapped) + if (e_client_mapped_get(ec)) { /* will be unmapped. so run capture */ e_comp_wl_remote_surface_image_save(ec); @@ -3100,7 +3100,7 @@ _e_comp_wl_surface_cb_commit(struct wl_client *client EINA_UNUSED, struct wl_res if (!cdata->first_commit) cdata->first_commit = EINA_TRUE; - if (!cdata->mapped) + if (!e_client_mapped_get(ec)) { if (cdata->shell.surface && cdata->pending.new_attach && !ec->internal && !cdata->sub.data && !ec->remote_surface.provider) @@ -4508,7 +4508,7 @@ e_comp_wl_surface_commit(E_Client *ec) if (!e_pixmap_usable_get(ec->pixmap)) { - if (cdata->mapped) + if (e_client_mapped_get(ec)) { if ((cdata->shell.surface) && (cdata->shell.unmap)) { @@ -4531,7 +4531,7 @@ e_comp_wl_surface_commit(E_Client *ec) } else { - if (!cdata->mapped) + if (!e_client_mapped_get(ec)) { if ((cdata->shell.surface) && (cdata->shell.map) && (!ec->ignored)) diff --git a/src/bin/e_comp_wl_capture.c b/src/bin/e_comp_wl_capture.c index a5c1e6f79e..67d8837a39 100644 --- a/src/bin/e_comp_wl_capture.c +++ b/src/bin/e_comp_wl_capture.c @@ -1273,7 +1273,6 @@ _e_capture_client_child_data_check(Thread_Data *td) Eina_List *list, *l; E_Client *ec = NULL; E_Client *child_ec = NULL; - E_Comp_Wl_Client_Data *cdata = NULL; ec = td->ec; if (!ec) return EINA_FALSE; @@ -1283,9 +1282,7 @@ _e_capture_client_child_data_check(Thread_Data *td) EINA_LIST_FOREACH(list, l, child_ec) { if (e_object_is_del(E_OBJECT(child_ec))) continue; - cdata = e_client_cdata_get(child_ec); - if (!cdata) continue; - if (!cdata->mapped) continue; + if (!e_client_mapped_get(child_ec)) continue; if (child_ec->iconic && child_ec->exp_iconify.by_client) continue; diff --git a/src/bin/e_comp_wl_shell.c b/src/bin/e_comp_wl_shell.c index 1500405732..7074791d41 100644 --- a/src/bin/e_comp_wl_shell.c +++ b/src/bin/e_comp_wl_shell.c @@ -444,7 +444,7 @@ e_shell_e_client_destroy(E_Client *ec) cdata = e_client_cdata_get(ec); if (!e_object_is_del(E_OBJECT(ec))) { - if (cdata->mapped) + if (e_client_mapped_get(ec)) { if ((cdata->shell.surface) && (cdata->shell.unmap)) @@ -859,7 +859,6 @@ static void _e_shell_surface_map(struct wl_resource *resource) { E_Client *ec; - E_Comp_Wl_Client_Data *cdata = NULL; if (!resource) return; @@ -873,11 +872,8 @@ _e_shell_surface_map(struct wl_resource *resource) return; } - cdata = e_client_cdata_get(ec); - if (!cdata) return; - /* map this surface if needed */ - if ((!cdata->mapped) && (e_pixmap_usable_get(ec->pixmap))) + if ((!e_client_mapped_get(ec)) && (e_pixmap_usable_get(ec->pixmap))) { ELOGF("SHELL", "Map window |win:0x%08x|ec_size:%d,%d|pid:%d|title:%s, name:%s", @@ -1392,15 +1388,11 @@ static Eina_Bool _e_xdg_shell_surface_map_cb_timer(void *data) { E_Client *ec = data; - E_Comp_Wl_Client_Data *cdata = NULL; if (!ec) return ECORE_CALLBACK_CANCEL; if (e_object_is_del(E_OBJECT(ec))) return ECORE_CALLBACK_CANCEL; - cdata = e_client_cdata_get(ec); - if (!cdata) return ECORE_CALLBACK_CANCEL; - - if ((!cdata->mapped) && (e_pixmap_usable_get(ec->pixmap))) + if ((!e_client_mapped_get(ec)) && (e_pixmap_usable_get(ec->pixmap))) { ELOGF("SHELL", "Map window by map_timer |win:0x%08x|ec_size:%d,%d|pid:%d|title:%s, name:%s", @@ -1432,7 +1424,6 @@ _e_xdg_shell_surface_map_cb_timer(void *data) EINTERN void e_shell_e_client_map(E_Client *ec) { - E_Comp_Wl_Client_Data *cdata = NULL; int pw = 0; int ph = 0; int cw; @@ -1440,10 +1431,7 @@ e_shell_e_client_map(E_Client *ec) EINA_SAFETY_ON_NULL_RETURN(ec); - cdata = e_client_cdata_get(ec); - EINA_SAFETY_ON_NULL_RETURN(cdata); - - if (cdata->mapped) + if (e_client_mapped_get(ec)) { ELOGF("SHELL", "Map window | Already mapped.", ec); return; @@ -1535,7 +1523,7 @@ e_shell_e_client_unmap(E_Client *ec) E_FREE_FUNC(ec->map_timer, ecore_timer_del); cdata = e_client_cdata_get(ec); - if (cdata->mapped) + if (e_client_mapped_get(ec)) { e_comp_object_signal_emit(ec->frame, "e,state,unmap", "e"); diff --git a/src/bin/e_comp_wl_subsurface.c b/src/bin/e_comp_wl_subsurface.c index 303b68240e..649e1ece83 100644 --- a/src/bin/e_comp_wl_subsurface.c +++ b/src/bin/e_comp_wl_subsurface.c @@ -265,7 +265,7 @@ _e_comp_wl_subsurface_show(E_Client *ec) subc_cdata = e_client_cdata_get(subc); if (!subc_cdata) continue; - if (e_pixmap_resource_get(subc->pixmap) && !subc_cdata->mapped) + if (e_pixmap_resource_get(subc->pixmap) && !e_client_mapped_get(subc)) { subc->visible = EINA_TRUE; evas_object_show(subc->frame); @@ -280,7 +280,7 @@ _e_comp_wl_subsurface_show(E_Client *ec) subc_cdata = e_client_cdata_get(subc); if (!subc_cdata) continue; - if (e_pixmap_resource_get(subc->pixmap) && !subc_cdata->mapped) + if (e_pixmap_resource_get(subc->pixmap) && !e_client_mapped_get(subc)) { subc->visible = EINA_TRUE; evas_object_show(subc->frame); @@ -310,7 +310,7 @@ _e_comp_wl_subsurface_hide(E_Client *ec) if (!sub_cdata->sub.data->stand_alone) { - if (sub_cdata->mapped) + if (e_client_mapped_get(subc)) { subc->visible = EINA_FALSE; evas_object_hide(subc->frame); @@ -327,7 +327,7 @@ _e_comp_wl_subsurface_hide(E_Client *ec) if (!sub_cdata->sub.data->stand_alone) { - if (sub_cdata->mapped) + if (e_client_mapped_get(subc)) { subc->visible = EINA_FALSE; evas_object_hide(subc->frame); diff --git a/src/bin/e_info_server.c b/src/bin/e_info_server.c index 4319816b66..4c95b36a27 100644 --- a/src/bin/e_info_server.c +++ b/src/bin/e_info_server.c @@ -283,8 +283,7 @@ _msg_ecs_append(Eldbus_Message_Iter *iter, Eina_Bool is_visible) else iconified = 0; - if (cdata) - mapped = cdata->mapped; + mapped = e_client_mapped_get(ec); _e_info_server_ec_hwc_info_get(ec, &hwc, &hwc_policy, &pl_zpos); @@ -372,8 +371,7 @@ _msg_clients_append(Eldbus_Message_Iter *iter, Eina_Bool is_visible) else iconified = 0; - if (cdata) - mapped = cdata->mapped; + mapped = e_client_mapped_get(ec); _e_info_server_ec_hwc_info_get(ec, &hwc, &hwc_policy, &pl_zpos); diff --git a/src/bin/e_output.c b/src/bin/e_output.c index 6710d5a9e9..193ee75a02 100644 --- a/src/bin/e_output.c +++ b/src/bin/e_output.c @@ -726,7 +726,7 @@ _e_output_visible_client_check(E_Output *output) if (!evas_object_visible_get(ec->frame)) continue; cdata = e_client_cdata_get(ec); if (cdata && cdata->sub.data) continue; /* skip subsurface */ - if (cdata && !cdata->mapped) continue; + if (!e_client_mapped_get(ec)) continue; if (ec->iconic) continue; e_client_geometry_get(ec, &x, &y, &w, &h); if (E_INTERSECTS(x, y, w, h, r.x, r.y, r.w, r.h)) diff --git a/src/bin/e_plane_renderer.c b/src/bin/e_plane_renderer.c index aa0b890885..de51dca8ec 100644 --- a/src/bin/e_plane_renderer.c +++ b/src/bin/e_plane_renderer.c @@ -998,7 +998,7 @@ _e_plane_renderer_recover_ec(E_Plane_Renderer *renderer) cdata = e_client_cdata_get(ec); if (!cdata) return; - if (!cdata->mapped) return; + if (!e_client_mapped_get(ec)) return; buffer = cdata->buffer_ref.buffer; diff --git a/src/bin/e_policy_visibility.c b/src/bin/e_policy_visibility.c index 8d03d8dfc1..8de2336598 100644 --- a/src/bin/e_policy_visibility.c +++ b/src/bin/e_policy_visibility.c @@ -167,7 +167,6 @@ _e_policy_check_transient_child_visible(E_Client *ancestor_ec, E_Client *ec) Eina_Bool visible = EINA_FALSE; Eina_List *list = NULL; E_Client *child_ec = NULL; - E_Comp_Wl_Client_Data *child_cdata = NULL; int anc_x, anc_y, anc_w, anc_h; int child_x, child_y, child_w, child_h; @@ -180,9 +179,7 @@ _e_policy_check_transient_child_visible(E_Client *ancestor_ec, E_Client *ec) { if (visible == EINA_TRUE) continue; - child_cdata = e_client_cdata_get(child_ec); - if (!child_cdata) continue; - if (!child_cdata->mapped && !child_ec->use_splash) continue; + if (!e_client_mapped_get(child_ec) && !child_ec->use_splash) continue; if (child_ec->transient_policy == E_TRANSIENT_BELOW) continue; if ((child_ec->exp_iconify.skip_iconify == EINA_TRUE) || @@ -235,7 +232,6 @@ static Eina_Bool _e_policy_check_above_alpha_opaque(E_Client *ec) { E_Client *above_ec; - E_Comp_Wl_Client_Data *above_cdata = NULL; Evas_Object *o; Eina_Bool alpha_opaque = EINA_FALSE; int ex, ey, ew, eh; @@ -248,8 +244,7 @@ _e_policy_check_above_alpha_opaque(E_Client *ec) above_ec = evas_object_data_get(o, "E_Client"); if (!above_ec) continue; if (e_client_util_ignored_get(above_ec)) continue; - above_cdata = e_client_cdata_get(above_ec); - if (above_cdata && !above_cdata->mapped) continue; + if (!e_client_mapped_get(above_ec)) continue; e_client_geometry_get(above_ec, &ax, &ay, &aw, &ah); if (!E_CONTAINS(ax, ay, aw, ah, ex, ey, ew, eh)) continue; @@ -268,7 +263,7 @@ _e_policy_check_above_alpha_opaque(E_Client *ec) { if (!above_ec->iconic) { - if (above_cdata && above_cdata->mapped) + if (e_client_mapped_get(above_ec)) alpha_opaque = EINA_TRUE; } } @@ -291,9 +286,8 @@ _e_policy_client_iconify_by_visibility(E_Client *ec) if (ec->bg_state) return; if (ec->exp_iconify.skip_iconify) return; if (ec->exp_iconify.skip_by_remote) return; + if (!e_client_mapped_get(ec)) return; - E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec); - if (cdata && !cdata->mapped) return; if (e_config->transient.iconify) { @@ -449,9 +443,7 @@ _e_policy_client_uniconify_by_visibility(E_Client *ec) if (ec->bg_state) return; if (ec->exp_iconify.skip_iconify) return; if (ec->exp_iconify.skip_by_remote) return; - - E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec); - if (cdata && !cdata->mapped) return; + if (!e_client_mapped_get(ec)) return; _e_policy_client_ancestor_uniconify(ec); @@ -1314,7 +1306,6 @@ _e_vis_client_check_obscured_by_same_layer(E_Client *ec) { Eina_Bool obscured = EINA_FALSE; E_Client *above = NULL; - E_Comp_Wl_Client_Data *above_cdata = NULL; int ex, ey, ew, eh; int ax, ay, aw, ah; @@ -1327,8 +1318,7 @@ _e_vis_client_check_obscured_by_same_layer(E_Client *ec) if (e_object_is_del(E_OBJECT(above))) continue; if (above->iconic && above->exp_iconify.by_client) continue; if (above->bg_state) continue; - above_cdata = e_client_cdata_get(above); - if (above_cdata && !above_cdata->mapped) continue; + if (!e_client_mapped_get(above)) continue; e_client_geometry_get(above, &ax, &ay, &aw, &ah); if (!E_CONTAINS(ax, ay, aw, ah, ex, ey, ew, eh)) continue; @@ -1362,7 +1352,6 @@ _e_vis_client_check_obscured_by_above_layers(E_Client *ec) { Eina_Bool obscured = EINA_FALSE; E_Client *above = NULL; - E_Comp_Wl_Client_Data *above_cdata = NULL; int ex, ey, ew, eh; int ax, ay, aw, ah; @@ -1375,8 +1364,7 @@ _e_vis_client_check_obscured_by_above_layers(E_Client *ec) if (e_object_is_del(E_OBJECT(above))) continue; if (above->iconic && above->exp_iconify.by_client) continue; if (above->bg_state) continue; - above_cdata = e_client_cdata_get(above); - if (above_cdata && !above_cdata->mapped) continue; + if (!e_client_mapped_get(above)) continue; e_client_geometry_get(above, &ax, &ay, &aw, &ah); if (!E_CONTAINS(ax, ay, aw, ah, ex, ey, ew, eh)) continue; @@ -1455,7 +1443,6 @@ static Eina_Bool _e_vis_client_add_uniconify_render_pending(E_Vis_Client *vc, E_Vis_Job_Type type, Eina_Bool raise, Eina_Bool force_send) { E_Client *ec; - E_Comp_Wl_Client_Data *cdata = NULL; Eina_Bool send_vis_event = EINA_TRUE; ec = vc->ec; @@ -1466,8 +1453,7 @@ _e_vis_client_add_uniconify_render_pending(E_Vis_Client *vc, E_Vis_Job_Type type return EINA_FALSE; } - cdata = e_client_cdata_get(ec); - if (cdata && !cdata->mapped) + if (!e_client_mapped_get(ec)) { ELOGF("POL_VIS", "Not mapped. no need to uniconify render.", ec); return EINA_FALSE; @@ -1556,7 +1542,6 @@ _e_vis_ec_activity_check(E_Client *ec, Eina_Bool check_alpha, Eina_Bool check_fu int x, y, w, h; E_Comp_Object_Content_Type type = E_COMP_OBJECT_CONTENT_TYPE_NONE; int check_mapped = 1; - E_Comp_Wl_Client_Data *cdata = NULL; /* check if ignored */ if (e_client_util_ignored_get(ec)) return EINA_FALSE; @@ -1570,8 +1555,7 @@ _e_vis_ec_activity_check(E_Client *ec, Eina_Bool check_alpha, Eina_Bool check_fu (type == E_COMP_OBJECT_CONTENT_TYPE_EXT_EDJE)) check_mapped = 0; /* check unmapped client */ - cdata = e_client_cdata_get(ec); - if (check_mapped && cdata && !cdata->mapped) return EINA_FALSE; + if (check_mapped && !e_client_mapped_get(ec)) return EINA_FALSE; /* check iconify window by client */ if ((ec->iconic) && (ec->exp_iconify.by_client)) return EINA_FALSE; /* check background state */ @@ -1685,7 +1669,6 @@ static E_Pol_Vis_Type _e_vis_ec_above_visible_type(E_Client *ec, Eina_Bool check_child) { E_Client *above; - E_Comp_Wl_Client_Data *above_cdata = NULL; E_Pol_Vis_Type above_vis_type = E_POL_VIS_TYPE_ALPHA; int ex, ey, ew, eh; int ax, ay, aw, ah; @@ -1717,8 +1700,7 @@ _e_vis_ec_above_visible_type(E_Client *ec, Eina_Bool check_child) if (check_child && (above->parent == ec)) continue; if (above->first_mapped) { - above_cdata = e_client_cdata_get(above); - if (above_cdata && !above_cdata->mapped) + if (!e_client_mapped_get(above)) continue; } @@ -1766,8 +1748,7 @@ _e_vis_client_check_obscure_below(E_Client *ec) if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE; if (ec->iconic && ec->exp_iconify.by_client) return EINA_FALSE; if (ec->bg_state) return EINA_FALSE; - E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec); - if (cdata && !cdata->mapped) return EINA_FALSE; + if (!e_client_mapped_get(ec)) return EINA_FALSE; if ((ec->argb) && (ec->visibility.opaque <= 0)) return EINA_FALSE; if (ec->visibility.obscured != E_VISIBILITY_UNOBSCURED) return EINA_FALSE; if (!ec->visible) return EINA_FALSE; @@ -2345,14 +2326,12 @@ e_policy_visibility_client_raise(E_Client *ec) E_API Eina_Bool e_policy_visibility_client_lower(E_Client *ec) { - E_Comp_Wl_Client_Data *cdata = NULL; E_Pol_Vis_Type above_vis_type; Eina_Bool ret = EINA_TRUE; E_VIS_CLIENT_GET_OR_RETURN_VAL(vc, ec, EINA_FALSE); - cdata = e_client_cdata_get(ec); - if ((cdata) && (!cdata->mapped)) + if (!e_client_mapped_get(ec)) { VS_DBG(ec, "client Unmapped."); return EINA_FALSE; diff --git a/src/bin/e_policy_wl.c b/src/bin/e_policy_wl.c index 08485bd60e..8217c148d0 100644 --- a/src/bin/e_policy_wl.c +++ b/src/bin/e_policy_wl.c @@ -1023,7 +1023,6 @@ _tzpol_iface_cb_vis_get(struct wl_client *client, struct wl_resource *res_tzpol, void e_policy_wl_visibility_send(E_Client *ec, int vis) { - E_Comp_Wl_Client_Data *cdata = NULL; E_Policy_Wl_Tzpol *tzpol; E_Policy_Wl_Surface *psurf; struct wl_resource *res_tzvis; @@ -1083,8 +1082,7 @@ e_policy_wl_visibility_send(E_Client *ec, int vis) sent_vis = -3; } - cdata = e_client_cdata_get(ec); - if (cdata && cdata->mapped) + if (e_client_mapped_get(ec)) { _launch_effect_hide(ec->netwm.pid); } @@ -1096,7 +1094,7 @@ e_policy_wl_visibility_send(E_Client *ec, int vis) res_tzvis, ver, sent_vis, - ec->netwm.pid, cdata, ec->icccm.title, ec->netwm.name); + ec->netwm.pid, e_client_cdata_get(ec), ec->icccm.title, ec->netwm.name); sent = EINA_TRUE; } } @@ -1358,7 +1356,6 @@ static void _tzpol_iface_cb_activate(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf) { E_Client *ec; - E_Comp_Wl_Client_Data *cdata = NULL; ec = wl_resource_get_user_data(surf); EINA_SAFETY_ON_NULL_RETURN(ec); @@ -1372,8 +1369,7 @@ _tzpol_iface_cb_activate(struct wl_client *client EINA_UNUSED, struct wl_resourc e_policy_hook_call(E_POLICY_HOOK_CLIENT_ACTIVE_REQ, ec); ec->post_lower = EINA_FALSE; - cdata = e_client_cdata_get(ec); - if (cdata && !cdata->mapped) + if (!e_client_mapped_get(ec)) ec->post_raise = EINA_TRUE; e_policy_wl_activate(ec); } @@ -1428,7 +1424,6 @@ _tzpol_iface_cb_activate_below_by_res_id(struct wl_client *client EINA_UNUSED, s E_Client *below_ec = NULL; E_Client *parent_ec = NULL; E_Client *focus_ec = NULL; - E_Comp_Wl_Client_Data *cdata = NULL; Eina_Bool check_ancestor = EINA_FALSE; Eina_Bool intercepted = EINA_FALSE; @@ -1476,8 +1471,7 @@ _tzpol_iface_cb_activate_below_by_res_id(struct wl_client *client EINA_UNUSED, s e_policy_stack_below(ec, below_ec); - cdata = e_client_cdata_get(ec); - if (cdata && !cdata->mapped) + if (!e_client_mapped_get(ec)) { ELOGF("TZPOL", "POST_RAISE_LOWER SET... raise:%d, lower:%d", ec, EINA_FALSE, EINA_FALSE); e_client_post_raise_lower_set(ec, EINA_FALSE, EINA_FALSE); @@ -1495,7 +1489,6 @@ static void _tzpol_iface_cb_activate_above_by_res_id(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol, uint32_t res_id, uint32_t above_res_id) { E_Client *ec = NULL; - E_Comp_Wl_Client_Data *cdata = NULL; E_Client *above_ec = NULL; E_Client *parent_ec = NULL; Eina_Bool check_ancestor = EINA_FALSE; @@ -1546,8 +1539,7 @@ _tzpol_iface_cb_activate_above_by_res_id(struct wl_client *client EINA_UNUSED, s e_policy_stack_above(ec, above_ec); - cdata = e_client_cdata_get(ec); - if (cdata && !cdata->mapped) + if (!e_client_mapped_get(ec)) { ELOGF("TZPOL", "POST_RAISE_LOWER SET... raise:%d, lower:%d", ec, EINA_FALSE, EINA_FALSE); e_client_post_raise_lower_set(ec, EINA_FALSE, EINA_FALSE); @@ -1558,7 +1550,6 @@ static void _tzpol_iface_cb_raise(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf) { E_Client *ec; - E_Comp_Wl_Client_Data *cdata = NULL; ec = wl_resource_get_user_data(surf); EINA_SAFETY_ON_NULL_RETURN(ec); @@ -1573,8 +1564,7 @@ _tzpol_iface_cb_raise(struct wl_client *client EINA_UNUSED, struct wl_resource * e_client_raise(ec); - cdata = e_client_cdata_get(ec); - if (cdata && !cdata->mapped) + if (!e_client_mapped_get(ec)) { ELOGF("TZPOL", "POST_RAISE_LOWER SET... raise:%d, lower:%d", ec, EINA_TRUE, EINA_FALSE); e_client_post_raise_lower_set(ec, EINA_TRUE, EINA_FALSE); @@ -1587,7 +1577,6 @@ static void _tzpol_iface_cb_lower(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf) { E_Client *ec = NULL; - E_Comp_Wl_Client_Data *cdata = NULL; ec = wl_resource_get_user_data(surf); EINA_SAFETY_ON_NULL_RETURN(ec); @@ -1603,8 +1592,7 @@ _tzpol_iface_cb_lower(struct wl_client *client EINA_UNUSED, struct wl_resource * if (e_policy_visibility_client_lower(ec)) return; - cdata = e_client_cdata_get(ec); - if (cdata && !cdata->mapped) + if (!e_client_mapped_get(ec)) { ELOGF("TZPOL", "POST_RAISE_LOWER SET... raise:%d, lower:%d", ec, EINA_FALSE, EINA_TRUE); e_client_post_raise_lower_set(ec, EINA_FALSE, EINA_TRUE); @@ -1620,7 +1608,6 @@ static void _tzpol_iface_cb_lower_by_res_id(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol, uint32_t res_id) { E_Client *ec = NULL; - E_Comp_Wl_Client_Data *cdata = NULL; ec = e_pixmap_find_client_by_res_id(res_id); EINA_SAFETY_ON_NULL_RETURN(ec); @@ -1633,8 +1620,7 @@ _tzpol_iface_cb_lower_by_res_id(struct wl_client *client EINA_UNUSED, struct wl_ e_client_lower(ec); - cdata = e_client_cdata_get(ec); - if (cdata && !cdata->mapped) + if (!e_client_mapped_get(ec)) { ELOGF("TZPOL", "POST_RAISE_LOWER SET... raise:%d, lower:%d", ec, EINA_FALSE, EINA_TRUE); e_client_post_raise_lower_set(ec, EINA_FALSE, EINA_TRUE); diff --git a/src/bin/services/e_service_cbhm.c b/src/bin/services/e_service_cbhm.c index e84ebb5c8c..3c66cc54e8 100644 --- a/src/bin/services/e_service_cbhm.c +++ b/src/bin/services/e_service_cbhm.c @@ -35,7 +35,6 @@ _cbhm_cb_evas_show(void *d, Evas *evas EINA_UNUSED, Evas_Object *obj, void *even { E_Policy_Cbhm *cbhm; E_Client *ec; - E_Comp_Wl_Client_Data *cdata = NULL; cbhm = d; if (EINA_UNLIKELY(!cbhm)) @@ -48,8 +47,7 @@ _cbhm_cb_evas_show(void *d, Evas *evas EINA_UNUSED, Evas_Object *obj, void *even if (ec->frame != obj) return; - cdata = e_client_cdata_get(ec); - if ((!cbhm->show_block) && (cdata->mapped)) + if ((!cbhm->show_block) && (e_client_mapped_get(ec))) cbhm->show_block = EINA_TRUE; } diff --git a/src/bin/services/e_service_launcher.c b/src/bin/services/e_service_launcher.c index 4c64a84121..4479097414 100644 --- a/src/bin/services/e_service_launcher.c +++ b/src/bin/services/e_service_launcher.c @@ -1327,8 +1327,7 @@ _launcher_cb_launch_done(struct wl_client *client EINA_UNUSED, if (target_ec->first_mapped) { - E_Comp_Wl_Client_Data *target_cdata = e_client_cdata_get(target_ec); - ELOGF("LAUNCH", "SHOW real win (target->frame:%p, map:%d) by launcher service (win:0x%08zx, ec:%p).", target_ec, target_ec->frame, target_cdata->mapped, e_client_util_win_get(lc->ec), lc->ec); + ELOGF("LAUNCH", "SHOW real win (target->frame:%p, map:%d) by launcher service (win:0x%08zx, ec:%p).", target_ec, target_ec->frame, e_client_mapped_get(target_ec), e_client_util_win_get(lc->ec), lc->ec); e_comp_object_signal_emit(target_ec->frame, "e,action,launch_real,done", "e"); } e_comp_object_signal_emit(target_ec->frame, "e,action,launch,done", "e"); @@ -1385,7 +1384,6 @@ static E_Client * _launcher_handler_rsm_provider_client_find(E_Client *rsm_consumer_ec) { E_Client *prov_ec = NULL; - E_Comp_Wl_Client_Data *prov_cdata = NULL; Eina_List *tzrs_provs, *l; E_Service_Launcher *lc; @@ -1400,8 +1398,7 @@ _launcher_handler_rsm_provider_client_find(E_Client *rsm_consumer_ec) if (!prov_ec->remote_surface.provider) continue; if (prov_ec->visible) continue; if (evas_object_visible_get(prov_ec->frame)) continue; - prov_cdata = e_client_cdata_get(prov_ec); - if (prov_cdata->mapped) continue; + if (e_client_mapped_get(prov_ec)) continue; if (!(lc = _launcher_handler_launcher_find(prov_ec))) continue; if (!lc->launched_ec) continue; -- 2.34.1