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);
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);
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;
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);
}
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;
}
}
_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);
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);
}
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;
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);
_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;
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);
_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);
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);
_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);
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);
_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);
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);
_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);
}
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))
{
_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",
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);
" |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);
{
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);
_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",
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,
}
/* 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
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);
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();
}
{
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);
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;
_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
_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)))
{
return;
}
- ec->comp_data->sub.watcher = res;
+ cdata->sub.watcher = res;
wl_resource_set_implementation(res,
&_tzpol_subsurf_watcher_iface,
_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",
}
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",
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);
_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
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);
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;
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);
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;
}
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);
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;
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)
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);
}
}
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;
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)