From af503aa0314dd70eac7f7a7db54f070a49b8054b Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Wed, 11 Nov 2020 13:24:00 +0900 Subject: [PATCH] e_policy_wl: use e_client_cdata_get Change-Id: Id83f9afad0206633a64c6b4197953134b8527a81 --- src/bin/e_policy_wl.c | 171 +++++++++++++++++++++++++++--------------- 1 file changed, 112 insertions(+), 59 deletions(-) diff --git a/src/bin/e_policy_wl.c b/src/bin/e_policy_wl.c index b82a46a4c9..f079f67a7c 100644 --- a/src/bin/e_policy_wl.c +++ b/src/bin/e_policy_wl.c @@ -807,8 +807,8 @@ _e_policy_wl_tzsh_extension_get(const char *name) static E_Policy_Wl_Surface * _e_policy_wl_surf_add(E_Client *ec, struct wl_resource *res_tzpol) { + E_Comp_Wl_Client_Data *cdata; E_Policy_Wl_Surface *psurf = NULL; - E_Policy_Wl_Tzpol *tzpol; tzpol = _e_policy_wl_tzpol_get(res_tzpol); @@ -825,8 +825,9 @@ _e_policy_wl_surf_add(E_Client *ec, struct wl_resource *res_tzpol) psurf->ec = ec; psurf->pid = ec->netwm.pid; - if (wl_resource_get_client(ec->comp_data->surface) == wl_resource_get_client(res_tzpol)) - psurf->surf = ec->comp_data->surface; + cdata = e_client_cdata_get(ec); + if (wl_resource_get_client(cdata->surface) == wl_resource_get_client(res_tzpol)) + psurf->surf = cdata->surface; tzpol->psurfs = eina_list_append(tzpol->psurfs, psurf); @@ -1022,6 +1023,7 @@ _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; E_Policy_Wl_Tzpol *tzpol; E_Policy_Wl_Surface *psurf; struct wl_resource *res_tzvis; @@ -1081,7 +1083,8 @@ e_policy_wl_visibility_send(E_Client *ec, int vis) sent_vis = -3; } - if (ec->comp_data && ec->comp_data->mapped) + cdata = e_client_cdata_get(ec); + if (cdata && cdata->mapped) { _launch_effect_hide(ec->netwm.pid); } @@ -1093,7 +1096,7 @@ e_policy_wl_visibility_send(E_Client *ec, int vis) res_tzvis, ver, sent_vis, - ec->netwm.pid, ec->comp_data, ec->icccm.title, ec->netwm.name); + ec->netwm.pid, cdata, ec->icccm.title, ec->netwm.name); sent = EINA_TRUE; } } @@ -1358,6 +1361,7 @@ 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; ec = wl_resource_get_user_data(surf); EINA_SAFETY_ON_NULL_RETURN(ec); @@ -1371,7 +1375,8 @@ _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; - if (ec->comp_data && !ec->comp_data->mapped) + cdata = e_client_cdata_get(ec); + if (cdata && !cdata->mapped) ec->post_raise = EINA_TRUE; e_policy_wl_activate(ec); } @@ -1426,6 +1431,7 @@ _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; Eina_Bool check_ancestor = EINA_FALSE; Eina_Bool intercepted = EINA_FALSE; @@ -1473,7 +1479,8 @@ _tzpol_iface_cb_activate_below_by_res_id(struct wl_client *client EINA_UNUSED, s e_policy_stack_below(ec, below_ec); - if ((ec->comp_data) && (!ec->comp_data->mapped)) + cdata = e_client_cdata_get(ec); + if (cdata && !cdata->mapped) { 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); @@ -1491,6 +1498,7 @@ 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; E_Client *above_ec = NULL; E_Client *parent_ec = NULL; Eina_Bool check_ancestor = EINA_FALSE; @@ -1541,7 +1549,8 @@ _tzpol_iface_cb_activate_above_by_res_id(struct wl_client *client EINA_UNUSED, s e_policy_stack_above(ec, above_ec); - if ((ec->comp_data) && (!ec->comp_data->mapped)) + cdata = e_client_cdata_get(ec); + if (cdata && !cdata->mapped) { 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); @@ -1552,6 +1561,7 @@ 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; ec = wl_resource_get_user_data(surf); EINA_SAFETY_ON_NULL_RETURN(ec); @@ -1566,7 +1576,8 @@ _tzpol_iface_cb_raise(struct wl_client *client EINA_UNUSED, struct wl_resource * e_client_raise(ec); - if ((ec->comp_data) && (!ec->comp_data->mapped)) + cdata = e_client_cdata_get(ec); + if (cdata && !cdata->mapped) { 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); @@ -1579,6 +1590,7 @@ 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; ec = wl_resource_get_user_data(surf); EINA_SAFETY_ON_NULL_RETURN(ec); @@ -1594,7 +1606,8 @@ _tzpol_iface_cb_lower(struct wl_client *client EINA_UNUSED, struct wl_resource * if (e_policy_visibility_client_lower(ec)) return; - if ((ec->comp_data) && (!ec->comp_data->mapped)) + cdata = e_client_cdata_get(ec); + if (cdata && !cdata->mapped) { 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); @@ -1610,6 +1623,7 @@ 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; ec = e_pixmap_find_client_by_res_id(res_id); EINA_SAFETY_ON_NULL_RETURN(ec); @@ -1622,7 +1636,8 @@ _tzpol_iface_cb_lower_by_res_id(struct wl_client *client EINA_UNUSED, struct wl_ e_client_lower(ec); - if ((ec->comp_data) && (!ec->comp_data->mapped)) + cdata = e_client_cdata_get(ec); + if (cdata && !cdata->mapped) { 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); @@ -1661,6 +1676,7 @@ static void _tzpol_iface_cb_role_set(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf, const char *role) { E_Client *ec; + E_Comp_Wl_Client_Data *cdata; EINA_SAFETY_ON_NULL_RETURN(role); @@ -1684,8 +1700,9 @@ _tzpol_iface_cb_role_set(struct wl_client *client EINA_UNUSED, struct wl_resourc } else if (!e_util_strcmp("cbhm", role)) { - if (!ec->comp_data) return; - e_comp_wl->selection.cbhm = ec->comp_data->surface; + cdata = e_client_cdata_get(ec); + if (!cdata) return; + e_comp_wl->selection.cbhm = cdata->surface; } else if (!e_util_strcmp("wl_pointer-cursor", role)) { @@ -1933,6 +1950,7 @@ static void _tzpol_iface_cb_transient_for_set(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol, uint32_t child_id, uint32_t parent_id) { E_Client *ec, *pc; + E_Comp_Wl_Client_Data *cdata, *pc_cdata; struct wl_resource *parent_surf; ELOGF("TZPOL", @@ -1941,12 +1959,14 @@ _tzpol_iface_cb_transient_for_set(struct wl_client *client EINA_UNUSED, struct w ec = e_pixmap_find_client_by_res_id(child_id); EINA_SAFETY_ON_NULL_RETURN(ec); + cdata = e_client_cdata_get(ec); pc = e_pixmap_find_client_by_res_id(parent_id); EINA_SAFETY_ON_NULL_RETURN(pc); - EINA_SAFETY_ON_NULL_RETURN(pc->comp_data); + pc_cdata = e_client_cdata_get(pc); + EINA_SAFETY_ON_NULL_RETURN(pc_cdata); - parent_surf = pc->comp_data->surface; + parent_surf = pc_cdata->surface; _e_policy_wl_parent_surf_set(ec, parent_surf); @@ -1960,7 +1980,7 @@ _tzpol_iface_cb_transient_for_set(struct wl_client *client EINA_UNUSED, struct w " |win:0x%08zx|child |s:%8p", ec, e_client_util_win_get(ec), - (ec->comp_data ? ec->comp_data->surface : NULL)); + (cdata ? cdata->surface : NULL)); tizen_policy_send_transient_for_done(res_tzpol, child_id); @@ -2040,40 +2060,46 @@ _tzpol_iface_cb_subsurf_place_below_parent(struct wl_client *client EINA_UNUSED, { E_Client *ec; E_Client *epc; + E_Comp_Wl_Client_Data *cdata, *epc_cdata; E_Comp_Wl_Subsurf_Data *sdata; ec = wl_resource_get_user_data(subsurf); EINA_SAFETY_ON_NULL_RETURN(ec); - EINA_SAFETY_ON_NULL_RETURN(ec->comp_data); + cdata = e_client_cdata_get(ec); + EINA_SAFETY_ON_NULL_RETURN(cdata); - sdata = ec->comp_data->sub.data; + sdata = cdata->sub.data; EINA_SAFETY_ON_NULL_RETURN(sdata); epc = sdata->parent; EINA_SAFETY_ON_NULL_RETURN(epc); + epc_cdata = e_client_cdata_get(epc); + EINA_SAFETY_ON_NULL_RETURN(epc_cdata); ELOGF("TZPOL", "SUBSURF|BELOW_PARENT", ec); - epc->comp_data->sub.list = eina_list_remove(epc->comp_data->sub.list, ec); - epc->comp_data->sub.list_pending = eina_list_remove(epc->comp_data->sub.list_pending, ec); - epc->comp_data->sub.below_list = eina_list_remove(epc->comp_data->sub.below_list, ec); - epc->comp_data->sub.below_list_pending = eina_list_remove(epc->comp_data->sub.below_list_pending, ec); + epc_cdata->sub.list = eina_list_remove(epc_cdata->sub.list, ec); + epc_cdata->sub.list_pending = eina_list_remove(epc_cdata->sub.list_pending, ec); + epc_cdata->sub.below_list = eina_list_remove(epc_cdata->sub.below_list, ec); + epc_cdata->sub.below_list_pending = eina_list_remove(epc_cdata->sub.below_list_pending, ec); - epc->comp_data->sub.below_list_pending = eina_list_append(epc->comp_data->sub.below_list_pending, ec); - epc->comp_data->sub.below_list = eina_list_append(epc->comp_data->sub.below_list, ec); - epc->comp_data->sub.list_changed = EINA_TRUE; + epc_cdata->sub.below_list_pending = eina_list_append(epc_cdata->sub.below_list_pending, ec); + epc_cdata->sub.below_list = eina_list_append(epc_cdata->sub.below_list, ec); + epc_cdata->sub.list_changed = EINA_TRUE; } static void _tzpol_iface_cb_subsurf_stand_alone_set(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *subsurf) { E_Client *ec; + E_Comp_Wl_Client_Data *cdata; E_Comp_Wl_Subsurf_Data *sdata; ec = wl_resource_get_user_data(subsurf); EINA_SAFETY_ON_NULL_RETURN(ec); - EINA_SAFETY_ON_NULL_RETURN(ec->comp_data); + cdata = e_client_cdata_get(ec); + EINA_SAFETY_ON_NULL_RETURN(cdata); - sdata = ec->comp_data->sub.data; + sdata = cdata->sub.data; EINA_SAFETY_ON_NULL_RETURN(sdata); ELOGF("TZPOL", "SUBSURF|STAND_ALONE", ec); @@ -2084,6 +2110,7 @@ static void _tzpol_iface_cb_subsurface_get(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *surface, uint32_t parent_id) { E_Client *ec, *epc; + E_Comp_Wl_Client_Data *cdata; ELOGF("TZPOL", "SUBSURF |wl_surface@%d|parent_id:%d", @@ -2100,8 +2127,9 @@ _tzpol_iface_cb_subsurface_get(struct wl_client *client, struct wl_resource *res if (e_object_is_del(E_OBJECT(ec))) return; + cdata = e_client_cdata_get(ec); /* check if this surface is already a sub-surface */ - if ((ec->comp_data) && (ec->comp_data->sub.data)) + if (cdata && cdata->sub.data) { wl_resource_post_error(resource, WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE, @@ -2120,8 +2148,8 @@ _tzpol_iface_cb_subsurface_get(struct wl_client *client, struct wl_resource *res } /* ec's parent comes from another process */ - if (ec->comp_data) - ec->comp_data->has_extern_parent = EINA_TRUE; + if (cdata) + cdata->has_extern_parent = EINA_TRUE; } static void @@ -2232,13 +2260,15 @@ _e_policy_wl_allowed_aux_hint_send(struct wl_resource *res_tzpol, struct wl_reso static void _e_policy_wl_aux_hint_apply(E_Client *ec) { + E_Comp_Wl_Client_Data *cdata; E_Comp_Wl_Aux_Hint *hint; Eina_List *l; - if (!ec->comp_data) return; - if (!ec->comp_data->aux_hint.changed) return; + cdata = e_client_cdata_get(ec); + if (!cdata) return; + if (!cdata->aux_hint.changed) return; - EINA_LIST_FOREACH(ec->comp_data->aux_hint.hints, l, hint) + EINA_LIST_FOREACH(cdata->aux_hint.hints, l, hint) { if (!hint->changed) continue; EC_CHANGED(ec); @@ -2360,16 +2390,16 @@ _e_policy_wl_aux_hint_apply(E_Client *ec) else if (!strcmp(hint->hint, hint_names[E_POLICY_HINT_MSG_USE])) { if ((hint->deleted) || (!strcmp(hint->val, "0"))) - ec->comp_data->aux_hint.use_msg = EINA_FALSE; + cdata->aux_hint.use_msg = EINA_FALSE; else if (!strcmp(hint->val, "1")) - ec->comp_data->aux_hint.use_msg = EINA_TRUE; + cdata->aux_hint.use_msg = EINA_TRUE; } else if (!strcmp(hint->hint, hint_names[E_COMP_HINT_ALWAYS_SELECTIVE])) { if ((hint->deleted) || (!strcmp(hint->val, "0"))) - ec->comp_data->never_hwc = EINA_FALSE; + cdata->never_hwc = EINA_FALSE; else if (!strcmp(hint->val, "1")) - ec->comp_data->never_hwc = EINA_TRUE; + cdata->never_hwc = EINA_TRUE; e_comp_render_queue(); } @@ -2825,6 +2855,7 @@ _e_policy_wl_dpy_surf_add(E_Client *ec, struct wl_resource *res_tz_dpy_pol) { E_Policy_Wl_Tz_Dpy_Pol *tz_dpy_pol = NULL; E_Policy_Wl_Dpy_Surface *dpy_surf = NULL; + E_Comp_Wl_Client_Data *cdata; tz_dpy_pol = _e_policy_wl_tz_dpy_pol_get(res_tz_dpy_pol); EINA_SAFETY_ON_NULL_RETURN_VAL(tz_dpy_pol, NULL); @@ -2836,7 +2867,8 @@ _e_policy_wl_dpy_surf_add(E_Client *ec, struct wl_resource *res_tz_dpy_pol) dpy_surf = E_NEW(E_Policy_Wl_Dpy_Surface, 1); EINA_SAFETY_ON_NULL_RETURN_VAL(dpy_surf, NULL); - dpy_surf->surf = ec->comp_data->surface; + cdata = e_client_cdata_get(ec); + dpy_surf->surf = cdata->surface; dpy_surf->tz_dpy_pol = tz_dpy_pol; dpy_surf->ec = ec; dpy_surf->brightness = -1; @@ -3069,11 +3101,14 @@ static void _tzpol_iface_cb_subsurf_watcher_destroy(struct wl_resource *resource) { E_Client *ec; + E_Comp_Wl_Client_Data *cdata; if (!(ec = wl_resource_get_user_data(resource))) return; - if (e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) return; + if (e_object_is_del(E_OBJECT(ec))) return; + cdata = e_client_cdata_get(ec); + if (!cdata) return; - ec->comp_data->sub.watcher = NULL; + cdata->sub.watcher = NULL; } static void @@ -3091,10 +3126,13 @@ static void _tzpol_iface_cb_subsurf_watcher_get(struct wl_client *client, struct wl_resource *res_tzpol, uint32_t id, struct wl_resource *surface) { E_Client *ec; + E_Comp_Wl_Client_Data *cdata; struct wl_resource *res; if (!(ec = wl_resource_get_user_data(surface))) return; if (e_object_is_del(E_OBJECT(ec))) return; + cdata = e_client_cdata_get(ec); + if (!cdata) return; if (!(res = wl_resource_create(client, &tizen_subsurface_watcher_interface, 1, id))) { @@ -3102,7 +3140,7 @@ _tzpol_iface_cb_subsurf_watcher_get(struct wl_client *client, struct wl_resource return; } - ec->comp_data->sub.watcher = res; + cdata->sub.watcher = res; wl_resource_set_implementation(res, &_tzpol_subsurf_watcher_iface, @@ -3114,6 +3152,7 @@ static void _tzpol_iface_cb_parent_set(struct wl_client *client, struct wl_resource *res_tzpol, struct wl_resource *child, struct wl_resource *parent) { E_Client *ec, *pc; + E_Comp_Wl_Client_Data *cdata, *pc_cdata; struct wl_resource *parent_surf; ELOGF("TZPOL", @@ -3130,9 +3169,10 @@ _tzpol_iface_cb_parent_set(struct wl_client *client, struct wl_resource *res_tzp } else { - EINA_SAFETY_ON_NULL_RETURN(pc->comp_data); + pc_cdata = e_client_cdata_get(pc); + EINA_SAFETY_ON_NULL_RETURN(pc_cdata); - parent_surf = pc->comp_data->surface; + parent_surf = pc_cdata->surface; _e_policy_wl_parent_surf_set(ec, parent_surf); ELOGF("TZPOL", @@ -3141,11 +3181,12 @@ _tzpol_iface_cb_parent_set(struct wl_client *client, struct wl_resource *res_tzp e_client_util_win_get(pc), parent_surf); + cdata = e_client_cdata_get(ec); ELOGF("TZPOL", " |win:0x%08zx|child |s:%8p", ec, e_client_util_win_get(ec), - (ec->comp_data ? ec->comp_data->surface : NULL)); + (cdata ? cdata->surface : NULL)); } EC_CHANGED(ec); @@ -3171,14 +3212,17 @@ static void _tzpol_iface_cb_has_video(struct wl_client *client, struct wl_resource *res_tzpol, struct wl_resource *surface, uint32_t has) { E_Client *ec; + E_Comp_Wl_Client_Data *cdata; if (!(ec = wl_resource_get_user_data(surface))) return; if (e_object_is_del(E_OBJECT(ec))) return; - if (ec->comp_data->has_video_client == has) return; + cdata = e_client_cdata_get(ec); + if (!cdata) return; + if (cdata->has_video_client == has) return; ELOGF("TZPOL", "video client has(%d)", ec, has); - ec->comp_data->has_video_client = has; + cdata->has_video_client = has; } static void @@ -4398,7 +4442,7 @@ _e_tzsh_indicator_find_topvisible_client(E_Zone *zone) continue; /* if ec is subsurface, skip this */ - cdata = (E_Comp_Wl_Client_Data *)ec->comp_data; + cdata = e_client_cdata_get(ec); if (cdata && cdata->sub.data) continue; e_client_geometry_get(ec, &ex, &ey, &ew, &eh); @@ -7129,14 +7173,16 @@ err: void e_policy_wl_indicator_flick_send(E_Client *ec) { + E_Comp_Wl_Client_Data *cdata; E_Policy_Wl_Tz_Indicator *tz_indicator; struct wl_resource *surf; tz_indicator = _e_policy_wl_tz_indicator_get_from_client(ec); EINA_SAFETY_ON_NULL_RETURN(tz_indicator); - if (ec->comp_data) - surf = ec->comp_data->surface; + cdata = e_client_cdata_get(ec); + if (cdata) + surf = cdata->surface; else surf = NULL; @@ -7265,6 +7311,7 @@ _tz_clipboard_cb_data_only_set(struct wl_client *client, struct wl_resource *res Eina_Bool res; Eina_List *clients; E_Client *ec, *found = NULL; + E_Comp_Wl_Client_Data *cdata; tz_clipboard = wl_resource_get_user_data(res_tz_clipboard); EINA_SAFETY_ON_NULL_RETURN(tz_clipboard); @@ -7293,9 +7340,10 @@ _tz_clipboard_cb_data_only_set(struct wl_client *client, struct wl_resource *res EINA_LIST_FREE(clients, ec) { if (found) continue; - if (ec->comp_data && ec->comp_data->surface) + cdata = e_client_cdata_get(ec); + if (cdata && cdata->surface) { - _wc = wl_resource_get_client(ec->comp_data->surface); + _wc = wl_resource_get_client(cdata->surface); if (_wc == client) found = ec; } @@ -7384,6 +7432,7 @@ err: EINTERN void e_policy_wl_clipboard_data_selected_send(E_Client *ec) { + E_Comp_Wl_Client_Data *cdata; E_Policy_Wl_Tz_Clipboard *tz_clipboard; EINA_SAFETY_ON_NULL_RETURN(ec); @@ -7391,13 +7440,16 @@ e_policy_wl_clipboard_data_selected_send(E_Client *ec) tz_clipboard = _e_policy_wl_tz_clipboard_get_from_client(ec); EINA_SAFETY_ON_NULL_RETURN(tz_clipboard); + cdata = e_client_cdata_get(ec); tizen_clipboard_send_data_selected(tz_clipboard->res_tz_clipboard, - ec->comp_data? ec->comp_data->surface : NULL); + cdata ? cdata->surface : NULL); } static void _e_policy_wl_cb_hook_shell_surface_ready(void *d, E_Client *ec) { + E_Comp_Wl_Client_Data *cdata; + if (EINA_UNLIKELY(!ec)) return; @@ -7405,8 +7457,9 @@ _e_policy_wl_cb_hook_shell_surface_ready(void *d, E_Client *ec) e_client_base_output_resolution_transform_adjust(ec); - if ((ec->comp_data->shell.configure_send) && - (ec->comp_data->shell.surface)) + cdata = e_client_cdata_get(ec); + if ((cdata->shell.configure_send) && + (cdata->shell.surface)) { int w = 0, h = 0; if (ec->lock_client_size) @@ -7414,8 +7467,7 @@ _e_policy_wl_cb_hook_shell_surface_ready(void *d, E_Client *ec) w = ec->w; h = ec->h; } - ec->comp_data->shell.configure_send(ec->comp_data->shell.surface, - 0, w, h); + cdata->shell.configure_send(cdata->shell.surface, 0, w, h); } } @@ -7474,6 +7526,7 @@ e_policy_wl_aux_message_send(E_Client *ec, const char *val, Eina_List *options) { + E_Comp_Wl_Client_Data *cdata; E_Policy_Wl_Tzpol *tzpol; E_Policy_Wl_Surface *psurf; Eina_List *l; @@ -7483,10 +7536,10 @@ e_policy_wl_aux_message_send(E_Client *ec, int len; char *p; - if (!ec->comp_data) return; - if (!ec->comp_data->aux_hint.use_msg) return; - if (e_object_is_del(E_OBJECT(ec))) return; + cdata = e_client_cdata_get(ec); + if (!cdata) return; + if (!cdata->aux_hint.use_msg) return; wl_array_init(&opt_array); EINA_LIST_FOREACH(options, l, option) -- 2.34.1