_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;
/* 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 (child->comp_data && !child->comp_data->mapped)
{
ELOGF("COMP", "STACK CHANGE CHILD. BUT not mapped. skip. child(ec:%p, win:0x%08zx)", ec, child, e_client_util_win_get(child));
continue;
{
if (!ec) return;
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
Eina_List *l, *ll;
E_Comp_Wl_Aux_Hint *hint;
static void
_e_client_transform_sub_apply(E_Client *ec, E_Client *epc, double zoom)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
E_Comp_Wl_Subsurf_Data *sdata = cdata->sub.data;
E_Client *subc;
Eina_List *l;
if (ec->visibility.skip) continue;
if (ec->is_cursor) continue;
/* if ec is subsurface, skip this */
- cdata = e_client_cdata_get(ec);
+ cdata = (E_Comp_Wl_Client_Data *)ec->comp_data;
if (cdata && cdata->sub.data) continue;
if ((!ec->first_mapped) &&
(e_comp_object_content_type_get(ec->frame) == E_COMP_OBJECT_CONTENT_TYPE_INT_IMAGE)) continue;
int w = 0;
int h = 0;
Eina_Bool check = EINA_FALSE;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!ec) return EINA_FALSE;
if (ec->frame)
evas_object_geometry_get(ec->frame, 0, 0, &w, &h);
- cdata = e_client_cdata_get(ec);
if ((ec->transform_core.transform_list) &&
- (cdata && cdata->sub.below_obj))
+ (ec->comp_data && ec->comp_data->sub.below_obj))
{
- const Evas_Map *map_ = evas_object_map_get(cdata->sub.below_obj);
+ const Evas_Map *map_ = evas_object_map_get(ec->comp_data->sub.below_obj);
if (!map_)
check = EINA_TRUE;
}
}
// check parent matrix change
- if (cdata)
+ if (ec->comp_data)
{
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
+
if (cdata->sub.data)
{
E_Client *parent = cdata->sub.data->parent;
E_Comp_Wl_Client_Data *cdata;
if (!ec) return;
+ if (!ec->comp_data) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
if (cdata->sub.below_obj)
_e_client_transform_core_vertices_apply(ec, cdata->sub.below_obj, vertices, NULL);
E_Comp_Wl_Client_Data *cdata;
if (!ec) return;
+ if (!ec->comp_data) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
if (cdata->sub.below_obj)
_e_client_transform_core_vertices_apply_with_zoom(ec, cdata->sub.below_obj, vertices, NULL, zoomx, zoomy, cx, cy);
// ignored client but needing eval (aux hint) such as remote surfaces
if (ec->changed)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- if (cdata && cdata->first_commit)
+ if (ec->comp_data && ec->comp_data->first_commit)
_e_client_aux_hint_eval(ec);
}
continue;
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);
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 (!ec->comp_data || !ec->comp_data->mapped)
{
if (!ec->exp_iconify.by_client)
{
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->comp_data ? ec->comp_data->mapped : 0);
if (!ec->zone) return;
if (ec->shading || (!ec->iconic)) return;
if (ec->pixmap && e_pixmap_usable_get(ec->pixmap))
{
- if (cdata && cdata->mapped)
+ if (ec->comp_data && ec->comp_data->mapped)
{
ELOGF("TZVIS", "UNICONIFY|object show", ec);
evas_object_show(ec->frame);
e_client_transform_apply(E_Client *ec, double angle, double zoom, int cx, int cy)
{
Evas_Map *map;
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
E_Client *subc;
Eina_List *l;
E_API void
e_client_transform_clear(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
E_Client *subc;
Eina_List *l;
e_client_base_output_resolution_update(E_Client *ec)
{
E_Appinfo *eai = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
int configured_width, configured_height;
int width, height;
if (!e_config->configured_output_resolution.use) return EINA_TRUE;
if (ec->base_output_resolution.use) return EINA_TRUE;
- cdata = e_client_cdata_get(ec);
-
/* Check whether it's subsurface or not
* The resolution of subsurface will follow the resolution of its toplevel surface.
* Transform for subsurface will be applied when toplevel surface does by
* implementation of e_client_transform_core.
*/
- if (cdata->sub.data) return EINA_FALSE;
+ if (ec->comp_data->sub.data) return EINA_FALSE;
configured_width = e_config->configured_output_resolution.w;
configured_height = e_config->configured_output_resolution.h;
E_API void
e_client_stack_above(E_Client *ec, E_Client *above)
{
- E_Comp_Wl_Client_Data *above_cdata = NULL;
-
if (!ec) return;
if (!ec->frame) return;
if (!above) return;
evas_object_stack_above(ec->frame, above->frame);
- above_cdata = e_client_cdata_get(above);
- if (!above_cdata) return;
-
/* Since calling evas_object_stack_above() messes up the stacking order of
* sub-surface of above, it should be updated. */
- if ((above_cdata->sub.list) &&
- (eina_list_count(above_cdata->sub.list) > 0))
+ if ((above->comp_data->sub.list) &&
+ (eina_list_count(above->comp_data->sub.list) > 0))
e_comp_wl_subsurface_stack_update(above);
}
E_API void
e_client_stack_below(E_Client *ec, E_Client *below)
{
- E_Comp_Wl_Client_Data *below_cdata = NULL;
-
if (!ec) return;
if (!ec->frame) return;
if (!below) return;
evas_object_stack_below(ec->frame, below->frame);
- below_cdata = e_client_cdata_get(below);
- if (!below_cdata) return;
-
/* Since calling evas_object_stack_below() messes up the stacking order of
* sub-surface of below, it should be updated. */
- if ((below_cdata->sub.below_list) &&
- (eina_list_count(below_cdata->sub.below_list) > 0))
+ if ((below->comp_data->sub.below_list) &&
+ (eina_list_count(below->comp_data->sub.below_list) > 0))
e_comp_wl_subsurface_stack_update(below);
}
E_Client *subc;
Eina_List *l, *ll;
Eina_Bool res = EINA_TRUE;
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- if ((e_object_is_del(E_OBJECT(ec))) || (!cdata))
+ if ((e_object_is_del(E_OBJECT(ec))) || (!ec->comp_data))
return res;
- EINA_LIST_FOREACH_SAFE(cdata->sub.below_list, l, ll, subc)
+ EINA_LIST_FOREACH_SAFE(ec->comp_data->sub.below_list, l, ll, subc)
{
res = _e_client_surface_tree_foreach_helper(subc, func, data);
if (!res)
res = func(data, ec);
if (res)
{
- EINA_LIST_FOREACH_SAFE(cdata->sub.list, l, ll, subc)
+ EINA_LIST_FOREACH_SAFE(ec->comp_data->sub.list, l, ll, subc)
{
res = _e_client_surface_tree_foreach_helper(subc,
func,
_e_comp_object_map_transform_pos(E_Client *ec, int sx, int sy, int *dx, int *dy)
{
E_Comp_Wl_Buffer_Viewport *vp;
- E_Comp_Wl_Client_Data *cdata = NULL;
int transform;
int bw, bh, tx, ty;
- cdata = e_client_cdata_get(ec);
-
- if (!ec || !cdata || e_object_is_del(E_OBJECT(ec)))
+ if (!ec || !ec->comp_data || e_object_is_del(E_OBJECT(ec)))
{
*dx = sx;
*dy = sy;
return;
}
- vp = &cdata->scaler.buffer_viewport;
+ vp = &ec->comp_data->scaler.buffer_viewport;
transform = e_comp_wl_output_buffer_transform_get(ec);
e_pixmap_size_get(ec->pixmap, &bw, &bh);
/* for subsurface, it should be swap 90 and 270 */
- if (cdata->sub.data)
+ if (ec->comp_data->sub.data)
switch (transform)
{
case WL_OUTPUT_TRANSFORM_90: transform = WL_OUTPUT_TRANSFORM_270; break;
_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;
e_comp_render_queue();
}
ec = e_client_above_get(cw->ec);
- cdata = e_client_cdata_get(ec);
/* skip subsurface: stacking subsurface is handled by e_comp_wl */
- while ((ec) && (cdata) && (cdata->sub.data))
+ while ((ec) && (ec->comp_data) && (ec->comp_data->sub.data))
ec = e_client_above_get(ec);
if (ec && (evas_object_layer_get(ec->frame) != evas_object_layer_get(obj)))
{
ec = e_client_below_get(cw->ec);
/* skip subsurface: stacking subsurface is handled by e_comp_wl */
- while ((ec) && (cdata) && (cdata->sub.data))
+ while ((ec) && (ec->comp_data) && (ec->comp_data->sub.data))
ec = e_client_below_get(ec);
if (ec && (evas_object_layer_get(ec->frame) == evas_object_layer_get(cw->smart_obj)))
{
e_config->transient.raise = 1;
EINA_LIST_FREE(list, child)
{
- child_cdata = e_client_cdata_get(child);
- if (child_cdata && !child_cdata->mapped)
+ if (child->comp_data && !child->comp_data->mapped)
{
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;
{
API_ENTRY;
E_Client *ec = cw->ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
Evas_Map *map;
int x1, y1, x2, y2, x, y, bw, bh, tw, th;
char buffer[128];
char *p = buffer;
int l, remain = sizeof buffer;
- if (!ec) return;
- if (!e_object_is_del(E_OBJECT(ec))) return;
-
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ if (!ec || !ec->comp_data || e_object_is_del(E_OBJECT(ec))) return;
/* if buffer had been flushed, buffer could be NULL. Then map will be applied
* when new buffer is attached.
*/
- if (!cdata->buffer_ref.buffer) return;
+ if (!ec->comp_data->buffer_ref.buffer) return;
if ((!cw->redirected) ||
(!e_comp_wl_output_buffer_transform_get(ec) &&
- cdata->scaler.buffer_viewport.buffer.scale == 1))
+ ec->comp_data->scaler.buffer_viewport.buffer.scale == 1))
{
if (evas_object_map_enable_get(cw->effect_obj))
{
API_ENTRY EINA_FALSE;
EINA_SAFETY_ON_NULL_RETURN_VAL(cw->ec, EINA_FALSE);
- if (!cw->ec) return EINA_FALSE;
- if (e_object_is_del(E_OBJECT(cw->ec))) return EINA_FALSE;
- if (!e_client_cdata_get(cw->ec)) return EINA_FALSE;
+ if ((!cw->ec) || (!cw->ec->comp_data) || (e_object_is_del(E_OBJECT(cw->ec))))
+ return EINA_FALSE;
switch (filter)
{
API_ENTRY E_COMP_IMAGE_FILTER_NONE;
EINA_SAFETY_ON_NULL_RETURN_VAL(cw->ec, E_COMP_IMAGE_FILTER_NONE);
- if (e_object_is_del(E_OBJECT(cw->ec))) return E_COMP_IMAGE_FILTER_NONE;
- if (!e_client_cdata_get(cw->ec)) return E_COMP_IMAGE_FILTER_NONE;
+ if ((!cw->ec->comp_data) || (e_object_is_del(E_OBJECT(cw->ec))))
+ return E_COMP_IMAGE_FILTER_NONE;
return cw->image_filter;
}
e_comp_screen_rotation_ignore_output_transform_send(E_Client *ec, Eina_Bool ignore)
{
E_Comp_Screen_Tzsr *tzsr = _tz_surface_rotation_find(ec);
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!tzsr) return;
ELOGF("TRANSFORM", "|tzsr(%p) ignore_output_transform(%d)", ec, tzsr, ignore);
- cdata = e_client_cdata_get(ec);
- tizen_screen_rotation_send_ignore_output_transform(tzsr->resource, cdata->surface, ignore);
+ tizen_screen_rotation_send_ignore_output_transform(tzsr->resource, ec->comp_data->surface, ignore);
}
EINTERN Eina_Bool
static void
_e_comp_wl_configure_send(E_Client *ec, Eina_Bool edges, Eina_Bool send_size)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
int w, h;
if (send_size)
else
w = h = 0;
- cdata = e_client_cdata_get(ec);
- cdata->shell.configure_send(cdata->shell.surface,
+ ec->comp_data->shell.configure_send(ec->comp_data->shell.surface,
edges * e_comp_wl->resize.edges,
w, h);
}
E_API enum wl_output_transform
e_comp_wl_output_buffer_transform_get(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Comp_Wl_Buffer_Viewport *vp;
E_Comp_Wl_Buffer *buffer;
enum wl_output_transform transform, rotation;
if (!ec) return WL_OUTPUT_TRANSFORM_NORMAL;
if (e_object_is_del(E_OBJECT(ec))) return WL_OUTPUT_TRANSFORM_NORMAL;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return WL_OUTPUT_TRANSFORM_NORMAL;
+ if (!ec->comp_data) return WL_OUTPUT_TRANSFORM_NORMAL;
- vp = &cdata->scaler.buffer_viewport;
- if (cdata->sub.data)
+ vp = &ec->comp_data->scaler.buffer_viewport;
+ if (ec->comp_data->sub.data)
return vp->buffer.transform;
- buffer = cdata->buffer_ref.buffer;
+ buffer = ec->comp_data->buffer_ref.buffer;
if (!buffer ||
(buffer->type != E_COMP_WL_BUFFER_TYPE_NATIVE && buffer->type != E_COMP_WL_BUFFER_TYPE_TBM))
EINTERN enum wl_output_transform
e_comp_wl_output_pending_buffer_transform_get(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Comp_Wl_Buffer_Viewport *vp;
E_Comp_Wl_Buffer *buffer;
enum wl_output_transform transform, rotation;
if (!ec) return WL_OUTPUT_TRANSFORM_NORMAL;
if (e_object_is_del(E_OBJECT(ec))) return WL_OUTPUT_TRANSFORM_NORMAL;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return WL_OUTPUT_TRANSFORM_NORMAL;
+ if (!ec->comp_data) return WL_OUTPUT_TRANSFORM_NORMAL;
- vp = &cdata->pending.buffer_viewport;
- if (cdata->sub.data)
+ vp = &ec->comp_data->pending.buffer_viewport;
+ if (ec->comp_data->sub.data)
return vp->buffer.transform;
- buffer = cdata->pending.buffer;
+ buffer = ec->comp_data->pending.buffer;
if (!buffer ||
(buffer->type != E_COMP_WL_BUFFER_TYPE_NATIVE && buffer->type != E_COMP_WL_BUFFER_TYPE_TBM))
E_API void
e_comp_wl_map_size_cal_from_buffer(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
- E_Comp_Wl_Buffer_Viewport *vp = NULL;
+ E_Comp_Wl_Buffer_Viewport *vp = &ec->comp_data->scaler.buffer_viewport;
E_Comp_Wl_Buffer *buffer;
int32_t width, height;
- if (!ec) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- vp = &cdata->scaler.buffer_viewport;
-
buffer = e_pixmap_resource_get(ec->pixmap);
if (!buffer)
{
- cdata->width_from_buffer = 0;
- cdata->height_from_buffer = 0;
+ ec->comp_data->width_from_buffer = 0;
+ ec->comp_data->height_from_buffer = 0;
return;
}
break;
}
- cdata->width_from_buffer = width;
- cdata->height_from_buffer = height;
+ ec->comp_data->width_from_buffer = width;
+ ec->comp_data->height_from_buffer = height;
}
E_API void
e_comp_wl_map_size_cal_from_viewport(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
- E_Comp_Wl_Buffer_Viewport *vp = NULL;
+ E_Comp_Wl_Buffer_Viewport *vp = &ec->comp_data->scaler.buffer_viewport;
int32_t width, height;
- if (!ec) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- vp = &cdata->scaler.buffer_viewport;
-
- width = cdata->width_from_buffer;
- height = cdata->height_from_buffer;
+ width = ec->comp_data->width_from_buffer;
+ height = ec->comp_data->height_from_buffer;
if (width == 0 && height == 0) return;
if (width != 0 && vp->surface.width != -1)
{
- cdata->width_from_viewport = vp->surface.width;
- cdata->height_from_viewport = vp->surface.height;
+ ec->comp_data->width_from_viewport = vp->surface.width;
+ ec->comp_data->height_from_viewport = vp->surface.height;
return;
}
{
int32_t w = wl_fixed_to_int(wl_fixed_from_int(1) - 1 + vp->buffer.src_width);
int32_t h = wl_fixed_to_int(wl_fixed_from_int(1) - 1 + vp->buffer.src_height);
- cdata->width_from_viewport = w ?: 1;
- cdata->height_from_viewport = h ?: 1;
+ ec->comp_data->width_from_viewport = w ?: 1;
+ ec->comp_data->height_from_viewport = h ?: 1;
return;
}
- cdata->width_from_viewport = width;
- cdata->height_from_viewport = height;
+ ec->comp_data->width_from_viewport = width;
+ ec->comp_data->height_from_viewport = height;
}
E_API E_Client*
e_comp_wl_topmost_parent_get(E_Client *ec)
{
E_Client *parent = NULL;
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- E_Comp_Wl_Client_Data *parent_cdata = NULL;
- if (!cdata || !cdata->sub.data)
+ if (!ec->comp_data || !ec->comp_data->sub.data)
return ec;
- parent = cdata->sub.data->parent;
+ parent = ec->comp_data->sub.data->parent;
while (parent)
{
- parent_cdata = e_client_cdata_get(parent);
- if (!parent_cdata || !parent_cdata->sub.data)
+ if (!parent->comp_data || !parent->comp_data->sub.data)
return parent;
- parent = parent_cdata->sub.data->parent;
+ parent = parent->comp_data->sub.data->parent;
}
return ec;
int x1, y1, x2, y2, x, y;
int dx, dy;
- if (!ec) return;
- if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ if (!ec || !ec->comp_data || e_object_is_del(E_OBJECT(ec))) return;
e_comp_object_map_update(ec->frame);
- vp = &cdata->scaler.buffer_viewport;
+ vp = &ec->comp_data->scaler.buffer_viewport;
if (vp->buffer.src_width == wl_fixed_from_int(-1)) return;
- sdata = cdata->sub.data;
+ cdata = ec->comp_data;
+ sdata = ec->comp_data->sub.data;
if (sdata)
{
dx = sdata->position.x;
if (sdata->remote_surface.offscreen_parent)
{
E_Client *offscreen_parent = sdata->remote_surface.offscreen_parent;
- E_Comp_Wl_Client_Data *off_screen_parent_cdata = e_client_cdata_get(offscreen_parent);
Eina_Rectangle *rect;
Eina_List *l;
- EINA_LIST_FOREACH(off_screen_parent_cdata->remote_surface.regions, l, rect)
+ EINA_LIST_FOREACH(offscreen_parent->comp_data->remote_surface.regions, l, rect)
{
/* TODO: If there are one more regions, it means that provider's offscreen
* is displayed by one more remote_surfaces. Have to consider it later. At
}
e_util_transform_viewport_set(cdata->viewport_transform, dx, dy,
- cdata->width_from_viewport,
- cdata->height_from_viewport);
+ ec->comp_data->width_from_viewport,
+ ec->comp_data->height_from_viewport);
x1 = wl_fixed_to_int(vp->buffer.src_x);
y1 = wl_fixed_to_int(vp->buffer.src_y);
e_util_transform_texcoord_set(cdata->viewport_transform, 3, x1, y2);
ELOGF("TRANSFORM", "viewport map: point(%d,%d %dx%d) uv(%d,%d %d,%d %d,%d %d,%d)",
- ec, ec->x, ec->y, cdata->width_from_viewport,
- cdata->height_from_viewport, x1, y1, x2, y1, x2, y2, x1, y2);
+ ec, ec->x, ec->y, ec->comp_data->width_from_viewport,
+ ec->comp_data->height_from_viewport, x1, y1, x2, y1, x2, y2, x1, y2);
e_client_transform_core_update(ec);
}
_e_comp_wl_evas_cb_show(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
{
E_Client *ec, *tmp;
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_List *l;
E_Client *topmost;
if (!(ec = data)) return;
if (e_object_is_del(data)) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
if (!ec->override) e_hints_window_visible_set(ec);
- if ((!ec->override) && (!ec->re_manage) && (!cdata->reparented) &&
- (!cdata->need_reparent))
+ if ((!ec->override) && (!ec->re_manage) && (!ec->comp_data->reparented) &&
+ (!ec->comp_data->need_reparent))
{
- cdata->need_reparent = EINA_TRUE;
+ ec->comp_data->need_reparent = EINA_TRUE;
ec->visible = EINA_TRUE;
}
if (!e_client_util_ignored_get(ec))
EC_CHANGED(ec);
}
- if (!cdata->need_reparent)
+ if (!ec->comp_data->need_reparent)
{
if ((ec->hidden) || (ec->iconic))
{
evas_object_show(tmp->frame);
topmost = e_comp_wl_topmost_parent_get(ec);
- if (topmost == ec && (cdata->sub.list || cdata->sub.below_list))
+ if (topmost == ec && (ec->comp_data->sub.list || ec->comp_data->sub.below_list))
e_comp_wl_subsurface_show(ec);
- if (cdata->sub.below_obj)
- evas_object_show(cdata->sub.below_obj);
+ if (ec->comp_data->sub.below_obj)
+ evas_object_show(ec->comp_data->sub.below_obj);
}
static void
_e_comp_wl_evas_cb_hide(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
{
E_Client *ec, *tmp;
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_List *l;
E_Client *topmost;
if (!(ec = data)) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
/* Uncommonly some clients's final buffer can be skipped if the client
* requests unmap of its surface right after wl_surface@commit.
* 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 (!ec->comp_data->mapped)
e_pixmap_image_clear(ec->pixmap, 1);
EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp)
evas_object_hide(tmp->frame);
topmost = e_comp_wl_topmost_parent_get(ec);
- if (topmost == ec && (cdata->sub.list || cdata->sub.below_list))
+ if (topmost == ec && (ec->comp_data->sub.list || ec->comp_data->sub.below_list))
e_comp_wl_subsurface_hide(ec);
- if (cdata->sub.below_obj)
- evas_object_hide(cdata->sub.below_obj);
+ if (ec->comp_data->sub.below_obj)
+ evas_object_hide(ec->comp_data->sub.below_obj);
}
static void
{
E_Client *ec;
E_Client *subc;
- E_Comp_Wl_Client_Data *cdata = NULL;
- E_Comp_Wl_Client_Data *subc_cdata = NULL;
Eina_List *l;
int x, y;
if (!(ec = data)) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- EINA_LIST_FOREACH(cdata->sub.list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc)
{
- subc_cdata = e_client_cdata_get(subc);
- if (!subc_cdata || !subc_cdata->sub.data) continue;
- x = ec->x + subc_cdata->sub.data->position.x;
- y = ec->y + subc_cdata->sub.data->position.y;
+ if (!subc->comp_data || !subc->comp_data->sub.data) continue;
+ x = ec->x + subc->comp_data->sub.data->position.x;
+ y = ec->y + subc->comp_data->sub.data->position.y;
evas_object_move(subc->frame, x, y);
- if (subc_cdata->scaler.viewport)
+ if (subc->comp_data->scaler.viewport)
{
- if (subc_cdata->viewport_transform)
+ E_Comp_Wl_Client_Data *cdata = subc->comp_data;
+ if (cdata->viewport_transform)
e_comp_wl_map_apply(subc);
}
}
- EINA_LIST_FOREACH(cdata->sub.below_list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.below_list, l, subc)
{
- subc_cdata = e_client_cdata_get(subc);
- if (!subc_cdata || !subc_cdata->sub.data) continue;
- x = ec->x + subc_cdata->sub.data->position.x;
- y = ec->y + subc_cdata->sub.data->position.y;
+ if (!subc->comp_data || !subc->comp_data->sub.data) continue;
+ x = ec->x + subc->comp_data->sub.data->position.x;
+ y = ec->y + subc->comp_data->sub.data->position.y;
evas_object_move(subc->frame, x, y);
- if (subc_cdata->scaler.viewport)
+ if (subc->comp_data->scaler.viewport)
{
- if (subc_cdata->viewport_transform)
+ E_Comp_Wl_Client_Data *cdata = subc->comp_data;
+ if (cdata->viewport_transform)
e_comp_wl_map_apply(subc);
}
}
- if (cdata->sub.below_obj)
- evas_object_move(cdata->sub.below_obj, ec->x, ec->y);
+ if (ec->comp_data->sub.below_obj)
+ evas_object_move(ec->comp_data->sub.below_obj, ec->x, ec->y);
}
static void
struct wl_resource *res;
struct wl_client *wc;
E_Comp_Config *comp_conf = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!ec) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata|| !cdata->surface) return;
+ if (!ec->comp_data || !ec->comp_data->surface) return;
if ((ec->ignored) && (!ec->remote_surface.provider)) return;
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
comp_conf = e_comp_config_get();
static E_Devicemgr_Input_Device *
_e_comp_wl_device_client_last_device_get(E_Client *ec, Ecore_Device_Class dev_class)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
switch (dev_class)
{
case ECORE_DEVICE_CLASS_MOUSE:
- return cdata->last_device_ptr;
+ return ec->comp_data->last_device_ptr;
case ECORE_DEVICE_CLASS_KEYBOARD:
- return cdata->last_device_kbd;
+ return ec->comp_data->last_device_kbd;
case ECORE_DEVICE_CLASS_TOUCH:
- return cdata->last_device_touch;
+ return ec->comp_data->last_device_touch;
default:
return NULL;;
}
static void
_e_comp_wl_device_client_last_device_set(E_Client *ec, Ecore_Device_Class dev_class, E_Devicemgr_Input_Device *device)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
switch (dev_class)
{
case ECORE_DEVICE_CLASS_MOUSE:
- cdata->last_device_ptr = device;
+ ec->comp_data->last_device_ptr = device;
break;
case ECORE_DEVICE_CLASS_KEYBOARD:
- cdata->last_device_kbd = device;
+ ec->comp_data->last_device_kbd = device;
break;
case ECORE_DEVICE_CLASS_TOUCH:
- cdata->last_device_touch = device;
+ ec->comp_data->last_device_touch = device;
break;
default:
break;
struct wl_client *wc;
uint32_t serial;
Eina_List *l, *ll;
- E_Comp_Wl_Client_Data *cdata = NULL;
EINA_SAFETY_ON_NULL_RETURN(dev);
return;
if (e_object_is_del(E_OBJECT(ec))) return;
if ((ec->ignored) && (!ec->remote_surface.provider)) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return;
+ if (!ec->comp_data || !ec->comp_data->surface) return;
dev_class = (Ecore_Device_Class)evas_device_class_get(dev);
dev_name = evas_device_description_get(dev);
ec_last_device = _e_comp_wl_device_client_last_device_get(ec, dev_class);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
EINA_LIST_FOREACH(e_devicemgr->device_list, l, input_dev)
{
if (!eina_streq(input_dev->identifier, dev_name) || (input_dev->clas != dev_class)) continue;
struct wl_client *wc;
uint32_t serial;
Eina_List *l;
- E_Comp_Wl_Client_Data *cdata = NULL;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return;
+ if (!ec->comp_data || !ec->comp_data->surface) return;
last_device = _e_comp_wl_device_last_device_get(dev_class);
if (!last_device) return;
_e_comp_wl_device_client_last_device_set(ec, dev_class, last_device);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
EINA_LIST_FOREACH(last_device->resources, l, dev_res)
{
if (wl_resource_get_client(dev_res) != wc) continue;
Eina_List *l;
uint32_t serial;
int cx, cy, px, py;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (e_comp->pointer->o_ptr && (!evas_object_visible_get(e_comp->pointer->o_ptr)))
e_pointer_object_set(e_comp->pointer, NULL, 0, 0);
if (!ec) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return;
+ if (!ec->comp_data || !ec->comp_data->surface) return;
px = wl_fixed_to_int(e_comp_wl->ptr.x);
py = wl_fixed_to_int(e_comp_wl->ptr.y);
cx = px - ec->client.x;
cy = py - ec->client.y;
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
{
if (!e_comp_wl_input_pointer_check(res)) continue;
if (wl_resource_get_client(res) != wc) continue;
- wl_pointer_send_enter(res, serial, cdata->surface,
+ wl_pointer_send_enter(res, serial, ec->comp_data->surface,
wl_fixed_from_int(cx), wl_fixed_from_int(cy));
ec->pointer_enter_sent = EINA_TRUE;
}
struct wl_client *wc;
Eina_List *l, *ll;
wl_fixed_t f_value;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!ec) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return;
+ if (!ec->comp_data || !ec->comp_data->surface) return;
f_value = wl_fixed_from_double(value);
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
EINA_LIST_FOREACH(e_devicemgr->device_list, l, input_dev)
{
struct wl_client *wc;
Eina_List *l;
uint32_t serial;
- E_Comp_Wl_Client_Data *cdata = NULL;
ev = event;
if (!(ec = data)) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return;
+
+ if (!ec->comp_data || !ec->comp_data->surface) return;
e_comp_wl->ptr.ec = ec;
if (e_comp_wl->drag)
}
if (!eina_list_count(e_comp_wl->ptr.resources)) return;
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
{
_e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, ev->timestamp);
- wl_pointer_send_enter(res, serial, cdata->surface,
+ wl_pointer_send_enter(res, serial, ec->comp_data->surface,
wl_fixed_from_int(ev->canvas.x - ec->client.x),
wl_fixed_from_int(ev->canvas.y - ec->client.y));
ec->pointer_enter_sent = EINA_TRUE;
_e_comp_wl_evas_cb_mouse_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
Evas_Event_Mouse_Out *ev;
struct wl_resource *res;
struct wl_client *wc;
if (e_comp_wl->ptr.ec == ec)
e_comp_wl->ptr.ec = NULL;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return;
+
+ if (!ec->comp_data || !ec->comp_data->surface) return;
if (e_comp_wl->drag)
{
if (!eina_list_count(e_comp_wl->ptr.resources)) return;
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
{
_e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, ev->timestamp);
- wl_pointer_send_leave(res, serial, cdata->surface);
+ wl_pointer_send_leave(res, serial, ec->comp_data->surface);
}
ec->pointer_enter_sent = EINA_FALSE;
}
wl_fixed_t x, y;
uint32_t serial;
E_Comp_Config *comp_conf = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!ec) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return;
+ if (!ec->comp_data || !ec->comp_data->surface) return;
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
if (pressed)
if (comp_conf && comp_conf->input_log_enable)
ELOGF("Touch", "Down (id: %d, time: %d, x:%d, y:%d, name:%20s)", ec, idx, timestamp, canvas_x - ec->client.x, canvas_y - ec->client.y, e_client_util_name_get(ec));
- wl_touch_send_down(res, serial, timestamp, cdata->surface, idx, x, y); //id 0 for the 1st finger
+ wl_touch_send_down(res, serial, timestamp, ec->comp_data->surface, idx, x, y); //id 0 for the 1st finger
}
else
{
struct wl_client *wc;
struct wl_resource *res;
wl_fixed_t x, y;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!ec) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return;
+ if (!ec->comp_data || !ec->comp_data->surface) return;
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
x = wl_fixed_from_int(canvas_x - ec->client.x);
y = wl_fixed_from_int(canvas_y - ec->client.y);
struct wl_resource *res;
struct wl_client *wc;
Eina_List *l;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!ec) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return;
+ if (!ec->comp_data || !ec->comp_data->surface) return;
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
{
if (!e_comp_wl_input_pointer_check(res)) continue;
_e_comp_wl_evas_cb_mouse_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
Evas_Event_Mouse_Move *ev;
Evas_Device *dev = NULL;
const char *dev_name;
if (ec->cur_mouse_action) return;
if (e_object_is_del(E_OBJECT(ec))) return;
if ((ec->ignored) && (!ec->remote_surface.provider)) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return;
+ if (!ec->comp_data || !ec->comp_data->surface) return;
if ((!need_send_motion) && (!need_send_released) && (ec->visibility.obscured == E_VISIBILITY_FULLY_OBSCURED)) return;
static void
_e_comp_wl_evas_handle_mouse_button_to_touch(E_Client *ec, uint32_t timestamp, int canvas_x, int canvas_y, Eina_Bool flag)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
-
if (ec->cur_mouse_action || e_comp_wl->drag) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return;
+ if (!ec->comp_data || !ec->comp_data->surface) return;
if ((ec->ignored) && (!ec->remote_surface.provider)) return;
e_comp_wl->ptr.button = BTN_LEFT;
static void
_e_comp_wl_mouse_wheel_send(E_Client *ec, int direction, int z, int timestamp)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
struct wl_resource *res;
struct wl_client *wc;
Eina_List *l;
if (!ec) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return;
+ if (!ec->comp_data || !ec->comp_data->surface) return;
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
{
if (!e_comp_wl_input_pointer_check(res)) continue;
_e_comp_wl_evas_cb_mouse_wheel(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
Evas_Event_Mouse_Wheel *ev;
ev = event;
if (e_object_is_del(E_OBJECT(ec))) return;
if ((ec->ignored) && (!ec->remote_surface.provider)) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return;
+ if (!ec->comp_data || !ec->comp_data->surface) return;
if (!eina_list_count(e_comp_wl->ptr.resources))
return;
_e_comp_wl_evas_cb_multi_down(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj, void *event)
{
E_Client *ec = data;
- E_Comp_Wl_Client_Data *cdata = NULL;
Evas_Event_Multi_Down *ev = event;
Evas_Device *dev = NULL;
const char *dev_name;
if (!ec) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return;
+ if (!ec->comp_data || !ec->comp_data->surface) return;
/* Do not deliver emulated single touch events to client */
if (ev->device == 0) return;
_e_comp_wl_evas_cb_multi_up(void *data, Evas *evas, Evas_Object *obj EINA_UNUSED, void *event)
{
E_Client *ec = data;
- E_Comp_Wl_Client_Data *cdata = NULL;
Evas_Event_Multi_Up *ev = event;
Evas_Device *dev = NULL;
const char *dev_name;
if (!ec) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return;
+ if (!ec->comp_data || !ec->comp_data->surface) return;
/* Do not deliver emulated single touch events to client */
if (ev->device == 0) return;
_e_comp_wl_evas_cb_multi_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
{
E_Client *ec = data;
- E_Comp_Wl_Client_Data *cdata = NULL;
Evas_Event_Multi_Move *ev = event;
Evas_Device *dev = NULL;
const char *dev_name;
if (!ec) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return;
+ if (!ec->comp_data || !ec->comp_data->surface) return;
/* Do not deliver emulated single touch events to client */
if (ev->device == 0) return;
static Eina_Bool
_e_comp_wl_evas_cb_focus_in_timer(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
uint32_t serial;
E_Comp_Wl_Key_Data *k;
struct wl_resource *res;
if (!ec) return EINA_FALSE;
if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return EINA_FALSE;
+ if (!ec->comp_data) return EINA_FALSE;
- cdata->on_focus_timer = NULL;
+ ec->comp_data->on_focus_timer = NULL;
if (!e_comp_wl->kbd.focused) return EINA_FALSE;
serial = wl_display_next_serial(e_comp_wl->wl.disp);
e_comp_wl_feed_focus_in(E_Client *ec)
{
E_Client *focused;
- E_Comp_Wl_Client_Data *cdata = NULL;
struct wl_resource *res;
struct wl_client *wc;
Eina_List *l;
if (!ec) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
if (ec->iconic) return;
/* block spurious focus events */
/* raise client priority */
_e_comp_wl_client_priority_raise(ec);
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
EINA_LIST_FOREACH(e_comp_wl->kbd.resources, l, res)
{
}
if (!e_comp_wl->kbd.focused) return;
- e_comp_wl->kbd.focus = cdata->surface;
+ e_comp_wl->kbd.focus = ec->comp_data->surface;
e_comp_wl_input_keyboard_enter_send(ec);
e_comp_wl_data_device_keyboard_focus_set();
- cdata->on_focus_timer =
+ ec->comp_data->on_focus_timer =
ecore_timer_add(((e_config->xkb.delay_held_key_input_to_focus)/1000.0),
(Ecore_Task_Cb)_e_comp_wl_evas_cb_focus_in_timer, ec);
int rotation = ec->e.state.rot.ang.curr;
_e_comp_wl_evas_cb_focus_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
struct wl_resource *res;
uint32_t serial;
E_Comp_Wl_Key_Data *k;
if (!(ec = data)) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ if (!ec->comp_data) return;
- E_FREE_FUNC(cdata->on_focus_timer, ecore_timer_del);
+ E_FREE_FUNC(ec->comp_data->on_focus_timer, ecore_timer_del);
/* lower client priority */
if (!e_object_is_del(data))
wl_array_for_each(k, &e_comp_wl->kbd.keys)
e_comp_wl_input_keyboard_state_update(k->key, EINA_FALSE);
- if (!cdata->surface) return;
+ if (!ec->comp_data->surface) return;
if (!eina_list_count(e_comp_wl->kbd.resources)) return;
wl_keyboard_send_key(res, serial, t,
k->key, WL_KEYBOARD_KEY_STATE_RELEASED);
}
- wl_keyboard_send_leave(res, serial, cdata->surface);
+ wl_keyboard_send_leave(res, serial, ec->comp_data->surface);
e_comp_wl->kbd.focused =
eina_list_remove_list(e_comp_wl->kbd.focused, l);
}
_e_comp_wl_evas_cb_resize(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!(ec = data)) return;
+
if ((ec->shading) || (ec->shaded)) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- if (!cdata->shell.configure_send) return;
+ if (!ec->comp_data->shell.configure_send) return;
/* TODO: calculate x, y with transfrom object */
if ((e_client_util_resizing_get(ec)) && (!ec->transformed) && (e_comp_wl->resize.edges))
}
x = E_CLAMP(x, 1, x);
y = E_CLAMP(y, 1, y);
- cdata->shell.configure_send(cdata->shell.surface,
+ ec->comp_data->shell.configure_send(ec->comp_data->shell.surface,
e_comp_wl->resize.edges,
x, y);
}
else if ((!ec->fullscreen) && (!ec->maximized) &&
- (!cdata->maximize_pre))
+ (!ec->comp_data->maximize_pre))
_e_comp_wl_configure_send(ec, 1, 1);
- if (cdata->sub.below_obj)
- evas_object_resize(cdata->sub.below_obj, ec->w, ec->h);
+ if (ec->comp_data->sub.below_obj)
+ evas_object_resize(ec->comp_data->sub.below_obj, ec->w, ec->h);
}
static void
_e_comp_wl_evas_cb_state_update(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
{
E_Client *ec = data;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
/* check for wayland pixmap */
- if (cdata->shell.configure_send)
+ if (ec->comp_data->shell.configure_send)
_e_comp_wl_configure_send(ec, 0, 0);
- cdata->maximize_pre = 0;
+ ec->comp_data->maximize_pre = 0;
}
static void
_e_comp_wl_evas_cb_maximize_pre(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
{
E_Client *ec = data;
- E_Comp_Wl_Client_Data *cdata = NULL;
- if (!ec) return;
- if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
-
- cdata->maximize_pre = 1;
+ ec->comp_data->maximize_pre = 1;
}
static void
static void
_e_comp_wl_evas_cb_kill_request(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
{
- E_Client *ec = data;
- E_Comp_Wl_Client_Data *cdata = NULL;
+ E_Client *ec;
- if (!ec) return;
+ if (!(ec = data)) return;
e_comp_ignore_win_del(E_PIXMAP_TYPE_WL, e_pixmap_window_get(ec->pixmap));
-
- cdata = e_client_cdata_get(ec);
- if (cdata)
+ if (ec->comp_data)
{
- if (cdata->reparented)
+ if (ec->comp_data->reparented)
e_client_comp_hidden_set(ec, EINA_TRUE);
}
static void
_e_comp_wl_evas_cb_ping(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
{
- E_Client *ec = data;
- E_Comp_Wl_Client_Data *cdata = NULL;
+ E_Client *ec;
- if (!ec) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- if (!cdata->shell.ping) return;
- if (!cdata->shell.surface) return;
+ if (!(ec = data)) return;
+ if (!(ec->comp_data)) return;
+ if (!(ec->comp_data->shell.ping)) return;
+ if (!(ec->comp_data->shell.surface)) return;
- cdata->shell.ping(cdata->shell.surface);
+ ec->comp_data->shell.ping(ec->comp_data->shell.surface);
}
static void
static void
_e_comp_wl_client_evas_init(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
-
- if (!ec) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- if (cdata->evas_init) return;
+ if (!ec || !ec->comp_data) return;
+ if (ec->comp_data->evas_init) return;
/* Workaround:
* Updating stack order of subsurface has to be done for safety, because
evas_object_smart_callback_add(ec->frame, "ping", _e_comp_wl_evas_cb_ping, ec);
evas_object_smart_callback_add(ec->frame, "color_set", _e_comp_wl_evas_cb_color_set, ec);
- cdata->evas_init = EINA_TRUE;
+ ec->comp_data->evas_init = EINA_TRUE;
}
static Eina_Bool
_e_comp_wl_cb_comp_object_add(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Comp_Object *ev)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
/* try to get the client from the object */
if (!(ec = e_comp_object_client_get(ev->comp_object)))
return ECORE_CALLBACK_RENEW;
/* if we have not setup evas callbacks for this client, do it */
- cdata = e_client_cdata_get(ec);
- if (!cdata->evas_init) _e_comp_wl_client_evas_init(ec);
+ if (!ec->comp_data->evas_init) _e_comp_wl_client_evas_init(ec);
return ECORE_CALLBACK_RENEW;
}
if (e_comp_wl->selection.target &&
e_comp_wl->drag)
{
- E_Comp_Wl_Client_Data *selection_target_cdata = e_client_cdata_get(e_comp_wl->selection.target);
struct wl_resource *res;
int x, y;
- res = e_comp_wl_data_find_for_client(wl_resource_get_client(selection_target_cdata->surface));
+ res = e_comp_wl_data_find_for_client(wl_resource_get_client(e_comp_wl->selection.target->comp_data->surface));
EINA_SAFETY_ON_NULL_RETURN_VAL(res, ECORE_CALLBACK_RENEW);
x = ev->x - e_comp_wl->selection.target->client.x;
_e_comp_wl_cb_client_rot_change_begin(void *d EINA_UNUSED, int t EINA_UNUSED, E_Event_Client_Rotation_Change_Begin *ev)
{
E_Client *ec = ev->ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Comp_Wl_Buffer_Viewport *vp;
if (!ec) return ECORE_CALLBACK_PASS_ON;
if (e_object_is_del(E_OBJECT(ec))) return ECORE_CALLBACK_PASS_ON;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return ECORE_CALLBACK_PASS_ON;
- if (cdata->sub.data) return ECORE_CALLBACK_PASS_ON;
+ if (!ec->comp_data) return ECORE_CALLBACK_PASS_ON;
+ if (ec->comp_data->sub.data) return ECORE_CALLBACK_PASS_ON;
if (ec->e.state.rot.ang.next < 0) return ECORE_CALLBACK_PASS_ON;
- vp = &cdata->scaler.buffer_viewport;
+ vp = &ec->comp_data->scaler.buffer_viewport;
vp->wait_for_transform_change = ((360 + ec->e.state.rot.ang.next - ec->e.state.rot.ang.curr) % 360) / 90;
DBG("ec(%p) wait_for_transform_change(%d)", ec, vp->wait_for_transform_change);
_e_comp_wl_cb_client_rot_change_cancel(void *d EINA_UNUSED, int t EINA_UNUSED, E_Event_Client_Rotation_Change_Cancel *ev)
{
E_Client *ec = ev->ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Comp_Wl_Buffer_Viewport *vp;
if (!ec) return ECORE_CALLBACK_PASS_ON;
if (e_object_is_del(E_OBJECT(ec))) return ECORE_CALLBACK_PASS_ON;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return ECORE_CALLBACK_PASS_ON;
- if (cdata->sub.data) return ECORE_CALLBACK_PASS_ON;
+ if (!ec->comp_data) return ECORE_CALLBACK_PASS_ON;
+ if (ec->comp_data->sub.data) return ECORE_CALLBACK_PASS_ON;
- vp = &cdata->scaler.buffer_viewport;
+ vp = &ec->comp_data->scaler.buffer_viewport;
vp->wait_for_transform_change = 0;
DBG("ec(%p) wait_for_transform_change(%d) reset", ec, vp->wait_for_transform_change);
static void
_e_comp_wl_surface_state_size_update(E_Client *ec, E_Comp_Wl_Surface_State *state)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
int prev_w, prev_h;
Eina_Rectangle *window;
}
if (e_comp_object_frame_exists(ec->frame)) return;
- cdata = e_client_cdata_get(ec);
- window = &cdata->shell.window;
+ window = &ec->comp_data->shell.window;
if ((!ec->borderless) && /* FIXME temporarily added this check code
* to prevent updating E_Client's size by frame */
(window->x || window->y || window->w || window->h))
E_Comp_Wl_Buffer *buffer;
struct wl_resource *cb;
Eina_List *l, *ll;
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- E_Comp_Wl_Buffer_Viewport *vp = &cdata->scaler.buffer_viewport;
+ E_Comp_Wl_Buffer_Viewport *vp = &ec->comp_data->scaler.buffer_viewport;
if (ec->ignored)
{
if ((ec->internal) ||
- (cdata->shell.surface && state->new_attach))
+ (ec->comp_data->shell.surface && state->new_attach))
{
EC_CHANGED(ec);
ec->new_client = 1;
}
}
- cdata->scaler.buffer_viewport = state->buffer_viewport;
+ ec->comp_data->scaler.buffer_viewport = state->buffer_viewport;
if (state->new_attach)
{
}
/* emit a apply_viewport signal when the information of viewport and buffer is ready */
- wl_signal_emit(&cdata->apply_viewport_signal,
- &cdata->surface);
+ wl_signal_emit(&ec->comp_data->apply_viewport_signal,
+ &ec->comp_data->surface);
_e_comp_wl_surface_state_buffer_set(state, NULL);
if (!e_pixmap_usable_get(ec->pixmap))
{
/* unmap ec */
- if (cdata->mapped)
+ if (ec->comp_data->mapped)
{
- if ((cdata->shell.surface) &&
- (cdata->shell.unmap))
+ if ((ec->comp_data->shell.surface) &&
+ (ec->comp_data->shell.unmap))
{
ELOGF("COMP", "Try to unmap. Call shell.unmap.", ec);
if (ec->show_pending.count > 0)
}
ec->show_pending.running = EINA_FALSE;
}
- cdata->shell.unmap(cdata->shell.surface);
+ ec->comp_data->shell.unmap(ec->comp_data->shell.surface);
}
else if ((ec->internal) ||
- (cdata->sub.data) ||
+ (ec->comp_data->sub.data) ||
(ec == e_comp_wl->drag_client))
{
ELOGF("COMP", "Try to unmap. Hide window. internal:%d, sub:%p, drag:%d",
- ec, ec->internal, cdata->sub.data, (ec == e_comp_wl->drag_client));
+ ec, ec->internal, ec->comp_data->sub.data, (ec == e_comp_wl->drag_client));
ec->visible = EINA_FALSE;
evas_object_hide(ec->frame);
- cdata->mapped = 0;
+ ec->comp_data->mapped = 0;
}
}
- if ((cdata->sub.below_obj) &&
- (evas_object_visible_get(cdata->sub.below_obj)))
+ if ((ec->comp_data->sub.below_obj) &&
+ (evas_object_visible_get(ec->comp_data->sub.below_obj)))
{
- evas_object_hide(cdata->sub.below_obj);
+ evas_object_hide(ec->comp_data->sub.below_obj);
}
}
else
{
/* map ec */
- if (!cdata->mapped)
+ if (!ec->comp_data->mapped)
{
- if ((cdata->shell.surface) &&
- (cdata->shell.map) &&
+ if ((ec->comp_data->shell.surface) &&
+ (ec->comp_data->shell.map) &&
(!ec->ignored))
{
ELOGF("COMP", "Try to map. Call shell.map.", ec);
- cdata->shell.map(cdata->shell.surface);
+ ec->comp_data->shell.map(ec->comp_data->shell.surface);
}
else if ((ec->internal) ||
(e_comp_wl_subsurface_can_show(ec)) ||
ec->visible = EINA_TRUE;
ec->ignored = 0;
evas_object_show(ec->frame);
- cdata->mapped = 1;
+ ec->comp_data->mapped = 1;
}
}
- if ((cdata->sub.below_obj) &&
- (!evas_object_visible_get(cdata->sub.below_obj)) &&
+ if ((ec->comp_data->sub.below_obj) &&
+ (!evas_object_visible_get(ec->comp_data->sub.below_obj)) &&
(evas_object_visible_get(ec->frame)))
{
- evas_object_show(cdata->sub.below_obj);
+ evas_object_show(ec->comp_data->sub.below_obj);
}
}
if ((state->new_attach) ||
(state->buffer_viewport.changed))
{
- if ((cdata->shell.surface) &&
- (cdata->shell.configure))
+ if ((ec->comp_data->shell.surface) &&
+ (ec->comp_data->shell.configure))
{
e_comp_wl_commit_sync_configure(ec);
}
}
}
- if (cdata->scaler.buffer_viewport.changed)
+ if (ec->comp_data->scaler.buffer_viewport.changed)
{
if (e_comp_wl->touch.pressed && !e_policy_client_is_keyboard_sub(ec))
e_comp_wl_touch_cancel();
state->sy = 0;
state->new_attach = EINA_FALSE;
- EINA_LIST_FOREACH_SAFE(cdata->frames, l, ll, cb)
+ EINA_LIST_FOREACH_SAFE(ec->comp_data->frames, l, ll, cb)
{
wl_callback_send_done(cb, (unsigned int)(ecore_loop_time_get() * 1000));
wl_resource_destroy(cb);
}
- /* insert state frame callbacks into cdata->frames
+ /* insert state frame callbacks into comp_data->frames
* NB: This clears state->frames list */
- cdata->frames = eina_list_merge(cdata->frames, state->frames);
+ ec->comp_data->frames = eina_list_merge(ec->comp_data->frames,
+ state->frames);
state->frames = NULL;
- e_presentation_time_container_feedback_discard(&cdata->presentation_container);
- e_presentation_time_container_feedback_merge(&cdata->presentation_container,
+ e_presentation_time_container_feedback_discard(&ec->comp_data->presentation_container);
+ e_presentation_time_container_feedback_merge(&ec->comp_data->presentation_container,
&state->presentation_container);
buffer = e_pixmap_resource_get(ec->pixmap);
/* FIXME: workaround for bad wayland egl driver which doesn't send damage request */
if (!eina_list_count(state->damages) && !eina_list_count(state->buffer_damages))
{
- if ((cdata->buffer_ref.buffer) &&
- ((cdata->buffer_ref.buffer->type == E_COMP_WL_BUFFER_TYPE_NATIVE) ||
- (cdata->buffer_ref.buffer->type == E_COMP_WL_BUFFER_TYPE_TBM)))
+ if ((ec->comp_data->buffer_ref.buffer) &&
+ ((ec->comp_data->buffer_ref.buffer->type == E_COMP_WL_BUFFER_TYPE_NATIVE) ||
+ (ec->comp_data->buffer_ref.buffer->type == E_COMP_WL_BUFFER_TYPE_TBM)))
{
e_comp_object_damage(ec->frame,
0, 0,
- cdata->buffer_ref.buffer->w,
- cdata->buffer_ref.buffer->h);
+ ec->comp_data->buffer_ref.buffer->w,
+ ec->comp_data->buffer_ref.buffer->h);
}
}
else
e_comp_wl_subsurface_check_below_bg_rectangle(ec);
- if ((cdata->video_client) &&
+ if ((ec->comp_data->video_client) &&
((buffer) &&
(buffer->type == E_COMP_WL_BUFFER_TYPE_VIDEO)) &&
(e_comp->wl_comp_data->available_hw_accel.underlay))
_e_comp_wl_surface_cb_attach(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *buffer_resource, int32_t sx, int32_t sy)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Comp_Wl_Buffer *buffer = NULL;
if (!(ec = wl_resource_get_user_data(resource))) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
if (buffer_resource)
{
}
}
- if (!cdata->mapped)
+ if (!ec->comp_data->mapped)
{
- if (cdata->shell.surface &&
- !ec->internal && !cdata->sub.data && !ec->remote_surface.provider)
+ if (ec->comp_data->shell.surface &&
+ !ec->internal && !ec->comp_data->sub.data && !ec->remote_surface.provider)
{
ELOGF("COMP", "Current unmapped. ATTACH buffer:%p", ec, buffer);
}
if (!buffer)
{
- if (cdata->mapped)
+ if (ec->comp_data->mapped)
{
/* will be unmapped. so run capture */
e_comp_wl_remote_surface_image_save(ec);
}
}
- _e_comp_wl_surface_state_buffer_set(&cdata->pending, buffer);
+ _e_comp_wl_surface_state_buffer_set(&ec->comp_data->pending, buffer);
- cdata->pending.sx = sx;
- cdata->pending.sy = sy;
- cdata->pending.new_attach = EINA_TRUE;
+ ec->comp_data->pending.sx = sx;
+ ec->comp_data->pending.sy = sy;
+ ec->comp_data->pending.new_attach = EINA_TRUE;
}
static void
_e_comp_wl_surface_cb_damage(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, int32_t x, int32_t y, int32_t w, int32_t h)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_Rectangle *dmg = NULL;
if (!(ec = wl_resource_get_user_data(resource))) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
if (!(dmg = eina_rectangle_new(x, y, w, h))) return;
- cdata->pending.damages = eina_list_append(cdata->pending.damages, dmg);
+ ec->comp_data->pending.damages =
+ eina_list_append(ec->comp_data->pending.damages, dmg);
}
static void
_e_comp_wl_frame_cb_destroy(struct wl_resource *resource)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Comp_Wl_Subsurf_Data *sdata;
if (!(ec = wl_resource_get_user_data(resource))) return;
if (!e_object_delay_del_ref_get(E_OBJECT(ec)))
return;
}
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ if (!ec->comp_data) return;
- if (cdata->frames)
- cdata->frames = eina_list_remove(cdata->frames, resource);
+ if (ec->comp_data->frames)
+ {
+ ec->comp_data->frames =
+ eina_list_remove(ec->comp_data->frames, resource);
+ }
- if (cdata->pending.frames)
- cdata->pending.frames = eina_list_remove(cdata->pending.frames, resource);
+ if (ec->comp_data->pending.frames)
+ {
+ ec->comp_data->pending.frames =
+ eina_list_remove(ec->comp_data->pending.frames, resource);
+ }
- sdata = cdata->sub.data;
+ sdata = ec->comp_data->sub.data;
if ((sdata) && (sdata->cached.frames))
{
sdata->cached.frames =
_e_comp_wl_surface_cb_frame(struct wl_client *client, struct wl_resource *resource, uint32_t callback)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
struct wl_resource *res;
if (!(ec = wl_resource_get_user_data(resource))) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
/* create frame callback */
if (!(res =
wl_resource_set_implementation(res, NULL, ec, _e_comp_wl_frame_cb_destroy);
- cdata->pending.frames = eina_list_prepend(cdata->pending.frames, res);
+ ec->comp_data->pending.frames =
+ eina_list_prepend(ec->comp_data->pending.frames, res);
}
static void
_e_comp_wl_surface_cb_opaque_region_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *region_resource)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!(ec = wl_resource_get_user_data(resource))) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- if (cdata->pending.opaque)
- eina_tiler_clear(cdata->pending.opaque);
+ if (ec->comp_data->pending.opaque)
+ eina_tiler_clear(ec->comp_data->pending.opaque);
if (region_resource)
{
Eina_Tiler *tmp;
if (!(tmp = wl_resource_get_user_data(region_resource)))
return;
- eina_tiler_union(cdata->pending.opaque, tmp);
+ eina_tiler_union(ec->comp_data->pending.opaque, tmp);
- if (!eina_tiler_empty(cdata->pending.opaque))
+ if (!eina_tiler_empty(ec->comp_data->pending.opaque))
{
if (ec->argb)
{
_e_comp_wl_surface_cb_input_region_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *region_resource)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!(ec = wl_resource_get_user_data(resource))) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- if (cdata->pending.input)
- eina_tiler_clear(cdata->pending.input);
+ if (ec->comp_data->pending.input)
+ eina_tiler_clear(ec->comp_data->pending.input);
if (region_resource)
{
Eina_Tiler *tmp;
e_comp_object_input_area_set(ec->frame, -1, -1, 1, 1);
}
else
- eina_tiler_union(cdata->pending.input, tmp);
+ eina_tiler_union(ec->comp_data->pending.input, tmp);
}
else
{
- eina_tiler_rect_add(cdata->pending.input,
+ eina_tiler_rect_add(ec->comp_data->pending.input,
&(Eina_Rectangle){0, 0, ec->client.w, ec->client.h});
}
}
_e_comp_wl_surface_cb_commit(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
{
E_Client *ec, *subc;
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_List *l;
E_Comp_Config *comp_conf = NULL;
if (!(ec = wl_resource_get_user_data(resource))) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- if (!cdata->first_commit)
- cdata->first_commit = EINA_TRUE;
+ if (!ec->comp_data->first_commit)
+ ec->comp_data->first_commit = EINA_TRUE;
- if (!cdata->mapped)
+ if (!ec->comp_data->mapped)
{
- if (cdata->shell.surface && cdata->pending.new_attach &&
- !ec->internal && !cdata->sub.data && !ec->remote_surface.provider)
+ if (ec->comp_data->shell.surface && ec->comp_data->pending.new_attach &&
+ !ec->internal && !ec->comp_data->sub.data && !ec->remote_surface.provider)
{
ELOGF("COMP", "Current unmapped. COMMIT. pixmap_usable:%d", ec, e_pixmap_usable_get(ec->pixmap));
e_comp_wl_surface_commit(ec);
- EINA_LIST_FOREACH(cdata->sub.list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc)
{
if (ec != subc)
e_comp_wl_subsurface_parent_commit(subc, EINA_FALSE);
}
- EINA_LIST_FOREACH(cdata->sub.below_list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.below_list, l, subc)
{
if (ec != subc)
e_comp_wl_subsurface_parent_commit(subc, EINA_FALSE);
_e_comp_wl_surface_cb_buffer_transform_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, int32_t transform)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!(ec = wl_resource_get_user_data(resource))) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
if (transform < 0 || transform > WL_OUTPUT_TRANSFORM_FLIPPED_270)
{
return;
}
- cdata->pending.buffer_viewport.buffer.transform = transform;
- cdata->pending.buffer_viewport.changed = 1;
+ ec->comp_data->pending.buffer_viewport.buffer.transform = transform;
+ ec->comp_data->pending.buffer_viewport.changed = 1;
}
static void
_e_comp_wl_surface_cb_buffer_scale_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, int32_t scale)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!(ec = wl_resource_get_user_data(resource))) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
if (scale < 1)
{
return;
}
- cdata->pending.buffer_viewport.buffer.scale = scale;
- cdata->pending.buffer_viewport.changed = 1;
+ ec->comp_data->pending.buffer_viewport.buffer.scale = scale;
+ ec->comp_data->pending.buffer_viewport.changed = 1;
}
static void
_e_comp_wl_surface_cb_damage_buffer(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, int32_t x, int32_t y, int32_t w, int32_t h)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_Rectangle *dmg = NULL;
if (!(ec = wl_resource_get_user_data(resource))) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
if (!(dmg = eina_rectangle_new(x, y, w, h))) return;
- cdata->pending.buffer_damages = eina_list_append(cdata->pending.buffer_damages, dmg);
+ ec->comp_data->pending.buffer_damages =
+ eina_list_append(ec->comp_data->pending.buffer_damages, dmg);
}
static const struct wl_surface_interface _e_surface_interface =
_e_comp_wl_surface_destroy(struct wl_resource *resource)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
struct wl_resource *res;
Eina_List *l, *ll;
if (!(ec = wl_resource_get_user_data(resource))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
if (ec == e_client_focused_get())
{
EINA_LIST_FOREACH_SAFE(e_comp_wl->kbd.focused, l, ll, res)
{
if (wl_resource_get_client(res) ==
- wl_resource_get_client(cdata->surface))
+ wl_resource_get_client(ec->comp_data->surface))
e_comp_wl->kbd.focused =
eina_list_remove_list(e_comp_wl->kbd.focused, l);
}
}
- cdata->surface = NULL;
- cdata->wl_surface = NULL;
+ ec->comp_data->surface = NULL;
+ ec->comp_data->wl_surface = NULL;
e_pixmap_win_id_del(ec->pixmap);
_e_comp_wl_surface_render_stop(ec);
}
if (ec)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
if (!ec->netwm.pid)
ec->netwm.pid = pid;
if (ec->new_client)
ec->new_client = 0;
if ((!ec->client.w) && (ec->client.h))
ec->client.w = ec->client.h = 1;
- cdata->surface = res;
+ ec->comp_data->surface = res;
ec->icccm.accepts_focus = 1;
}
_e_comp_wl_client_cb_new(void *data EINA_UNUSED, E_Client *ec)
{
Ecore_Window win;
- E_Comp_Wl_Client_Data *cdata = NULL;
/* make sure this is a wayland client */
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
return;
}
- if (!(cdata = E_NEW(E_Comp_Wl_Client_Data, 1)))
+ if (!(ec->comp_data = E_NEW(E_Comp_Client_Data, 1)))
{
ERR("Could not allocate new client data structure");
TRACE_DS_END();
return;
}
- ec->comp_data = cdata;
- wl_signal_init(&cdata->destroy_signal);
- wl_signal_init(&cdata->apply_viewport_signal);
+ wl_signal_init(&ec->comp_data->destroy_signal);
+ wl_signal_init(&ec->comp_data->apply_viewport_signal);
- _e_comp_wl_surface_state_init(&cdata->pending, ec->w, ec->h);
+ _e_comp_wl_surface_state_init(&ec->comp_data->pending, ec->w, ec->h);
/* set initial client properties */
ec->argb = EINA_FALSE;
ec->icccm.delete_request = EINA_TRUE;
/* set initial client data properties */
- cdata->mapped = EINA_FALSE;
- cdata->first_damage = ec->internal;
+ ec->comp_data->mapped = EINA_FALSE;
+ ec->comp_data->first_damage = ec->internal;
- cdata->need_reparent = !ec->internal;
+ ec->comp_data->need_reparent = !ec->internal;
/* set initial value of scaler */
- cdata->scaler.buffer_viewport.buffer.transform = WL_OUTPUT_TRANSFORM_NORMAL;
- cdata->scaler.buffer_viewport.buffer.scale = 1;
- cdata->scaler.buffer_viewport.buffer.src_width = wl_fixed_from_int(-1);
- cdata->scaler.buffer_viewport.surface.width = -1;
+ ec->comp_data->scaler.buffer_viewport.buffer.transform = WL_OUTPUT_TRANSFORM_NORMAL;
+ ec->comp_data->scaler.buffer_viewport.buffer.scale = 1;
+ ec->comp_data->scaler.buffer_viewport.buffer.src_width = wl_fixed_from_int(-1);
+ ec->comp_data->scaler.buffer_viewport.surface.width = -1;
- e_presentation_time_container_init(&cdata->presentation_container);
+ e_presentation_time_container_init(&ec->comp_data->presentation_container);
- E_Comp_Wl_Client_Data *p_cdata = e_pixmap_cdata_get(ec->pixmap);
+ E_Comp_Client_Data *p_cdata = e_pixmap_cdata_get(ec->pixmap);
EINA_SAFETY_ON_NULL_GOTO(p_cdata, end);
- e_pixmap_cdata_set(ec->pixmap, cdata);
+ e_pixmap_cdata_set(ec->pixmap, ec->comp_data);
end:
TRACE_DS_END();
static void
_e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
+ /* Eina_Rectangle *dmg; */
struct wl_resource *cb;
/* make sure this is a wayland client */
TRACE_DS_BEGIN(COMP_WL:CLIENT DEL CB);
- cdata = e_client_cdata_get(ec);
- if ((!ec->already_unparented) && (cdata->reparented))
+ if ((!ec->already_unparented) && (ec->comp_data->reparented))
_e_comp_wl_focus_down_set(ec);
ec->already_unparented = EINA_TRUE;
- if (cdata->reparented)
+ if (ec->comp_data->reparented)
{
/* reset pixmap parent window */
e_pixmap_parent_window_set(ec->pixmap, 0);
}
- if (cdata->sub.watcher)
- wl_resource_destroy(cdata->sub.watcher);
+ if (ec->comp_data->sub.watcher)
+ wl_resource_destroy(ec->comp_data->sub.watcher);
if ((ec->parent) && (ec->parent->modal == ec))
{
ec->parent->modal = NULL;
}
- wl_signal_emit(&cdata->destroy_signal, &cdata->surface);
+ wl_signal_emit(&ec->comp_data->destroy_signal, &ec->comp_data->surface);
- _e_comp_wl_surface_state_finish(&cdata->pending);
+ _e_comp_wl_surface_state_finish(&ec->comp_data->pending);
- e_comp_wl_buffer_reference(&cdata->buffer_ref, NULL);
+ e_comp_wl_buffer_reference(&ec->comp_data->buffer_ref, NULL);
- EINA_LIST_FREE(cdata->frames, cb)
+ EINA_LIST_FREE(ec->comp_data->frames, cb)
wl_resource_destroy(cb);
- EINA_LIST_FREE(cdata->pending.frames, cb)
+ EINA_LIST_FREE(ec->comp_data->pending.frames, cb)
wl_resource_destroy(cb);
- if (cdata->surface)
- wl_resource_set_user_data(cdata->surface, NULL);
+ if (ec->comp_data->surface)
+ wl_resource_set_user_data(ec->comp_data->surface, NULL);
if (ec->internal_elm_win)
_e_comp_wl_surface_render_stop(ec);
_e_comp_wl_focus_check();
- if (cdata->aux_hint.hints)
+ if (ec->comp_data->aux_hint.hints)
{
E_Comp_Wl_Aux_Hint *hint;
- EINA_LIST_FREE(cdata->aux_hint.hints, hint)
+ EINA_LIST_FREE(ec->comp_data->aux_hint.hints, hint)
{
eina_stringshare_del(hint->hint);
eina_stringshare_del(hint->val);
cursor_timer_ec = NULL;
}
- if (e_comp_wl->selection.cbhm == cdata->surface)
+ if (e_comp_wl->selection.cbhm == ec->comp_data->surface)
e_comp_wl->selection.cbhm = NULL;
- if (cdata->viewport_transform)
+ if (ec->comp_data->viewport_transform)
{
- e_client_transform_core_remove(ec, cdata->viewport_transform);
- e_util_transform_del(cdata->viewport_transform);
- cdata->viewport_transform = NULL;
+ e_client_transform_core_remove(ec, ec->comp_data->viewport_transform);
+ e_util_transform_del(ec->comp_data->viewport_transform);
+ ec->comp_data->viewport_transform = NULL;
}
- e_presentation_time_container_finish(&cdata->presentation_container);
+ e_presentation_time_container_finish(&ec->comp_data->presentation_container);
e_pixmap_cdata_set(ec->pixmap, NULL);
- E_FREE_FUNC(cdata->on_focus_timer, ecore_timer_del);
+ E_FREE_FUNC(ec->comp_data->on_focus_timer, ecore_timer_del);
- E_FREE(cdata);
- ec->comp_data = NULL;
+ E_FREE(ec->comp_data);
_e_comp_wl_focus_check();
static void
_e_comp_wl_client_cb_focus_set(void *data EINA_UNUSED, E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- if (!cdata) return;
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
/* send configure */
- if (cdata->shell.configure_send)
+ if (ec->comp_data->shell.configure_send)
{
- if (cdata->shell.surface)
+ if (ec->comp_data->shell.surface)
_e_comp_wl_configure_send(ec, 0, 0);
}
- e_comp_wl->kbd.focus = cdata->surface;
+ e_comp_wl->kbd.focus = ec->comp_data->surface;
}
static void
_e_comp_wl_client_cb_focus_unset(void *data EINA_UNUSED, E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- if (!cdata) return;
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
/* send configure */
- if (cdata->shell.configure_send)
+ if (ec->comp_data->shell.configure_send)
{
- if (cdata->shell.surface)
+ if (ec->comp_data->shell.surface)
_e_comp_wl_configure_send(ec, 0, 0);
}
_e_comp_wl_focus_check();
- if (e_comp_wl->kbd.focus == cdata->surface)
+ if (e_comp_wl->kbd.focus == ec->comp_data->surface)
e_comp_wl->kbd.focus = NULL;
}
if (ec)
{
E_Pixmap *oldep = NULL;
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- if (cdata)
+ if (ec->comp_data)
{
/* do NOT replace with the client having comp data */
return NULL;
/* to set-up comp data */
_e_comp_wl_client_cb_new(NULL, ec);
ec->ignored = 0;
- if (!cdata) return NULL;
+ if (!ec->comp_data) return NULL;
_e_comp_wl_client_evas_init(ec);
ELOGF("COMP", "Reusable ec. new_pixmap:%p", ec, ec->pixmap);
EINTERN void
e_comp_wl_surface_attach(E_Client *ec, E_Comp_Wl_Buffer *buffer)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Event_Client *ev;
ev = E_NEW(E_Event_Client, 1);
if (!ev) return;
- cdata = e_client_cdata_get(ec);
- e_comp_wl_buffer_reference(&cdata->buffer_ref, buffer);
+ e_comp_wl_buffer_reference(&ec->comp_data->buffer_ref, buffer);
/* set usable early because shell module checks this */
- if (cdata->shell.surface || cdata->sub.data)
+ if (ec->comp_data->shell.surface || ec->comp_data->sub.data)
e_pixmap_usable_set(ec->pixmap, (buffer != NULL));
e_pixmap_resource_set(ec->pixmap, buffer);
e_pixmap_refresh(ec->pixmap);
e_comp_wl_map_size_cal_from_buffer(ec);
- _e_comp_wl_surface_state_size_update(ec, &cdata->pending);
+ _e_comp_wl_surface_state_size_update(ec, &ec->comp_data->pending);
/* wm-policy module uses it */
_e_comp_wl_hook_call(E_COMP_WL_HOOK_BUFFER_CHANGE, ec);
E_API Eina_Bool
e_comp_wl_surface_commit(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_Bool ignored;
int x = 0, y = 0;
- cdata = e_client_cdata_get(ec);
- _e_comp_wl_surface_state_commit(ec, &cdata->pending);
+ _e_comp_wl_surface_state_commit(ec, &ec->comp_data->pending);
if (!e_comp_object_damage_exists(ec->frame))
{
- if ((cdata->video_client) ||
+ if ((ec->comp_data->video_client) ||
(!e_client_video_hw_composition_check(ec)))
e_pixmap_image_clear(ec->pixmap, 1);
}
if (!e_pixmap_usable_get(ec->pixmap))
{
- if (cdata->mapped)
+ if (ec->comp_data->mapped)
{
- if ((cdata->shell.surface) && (cdata->shell.unmap))
+ if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap))
{
ELOGF("COMP", "Try to unmap2. Call shell.unmap.", ec);
- cdata->shell.unmap(cdata->shell.surface);
+ ec->comp_data->shell.unmap(ec->comp_data->shell.surface);
}
- else if (e_client_has_xwindow(ec) || ec->internal || cdata->sub.data ||
+ else if (e_client_has_xwindow(ec) || ec->internal || ec->comp_data->sub.data ||
(ec == e_comp_wl->drag_client))
{
ELOGF("COMP", "Try to unmap2. Hide window. internal:%d, sub:%p, drag:%d",
- ec, ec->internal, cdata->sub.data, (ec == e_comp_wl->drag_client));
+ ec, ec->internal, ec->comp_data->sub.data, (ec == e_comp_wl->drag_client));
ec->visible = EINA_FALSE;
evas_object_hide(ec->frame);
- cdata->mapped = 0;
+ ec->comp_data->mapped = 0;
}
}
- if (cdata->sub.below_obj && evas_object_visible_get(cdata->sub.below_obj))
- evas_object_hide(cdata->sub.below_obj);
+ if (ec->comp_data->sub.below_obj && evas_object_visible_get(ec->comp_data->sub.below_obj))
+ evas_object_hide(ec->comp_data->sub.below_obj);
}
else
{
- if (!cdata->mapped)
+ if (!ec->comp_data->mapped)
{
- if ((cdata->shell.surface) && (cdata->shell.map) &&
+ if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map) &&
(!ec->ignored))
{
ELOGF("COMP", "Try to map2. Call shell.map.", ec);
- cdata->shell.map(cdata->shell.surface);
+ ec->comp_data->shell.map(ec->comp_data->shell.surface);
}
else if (e_client_has_xwindow(ec) || ec->internal || e_comp_wl_subsurface_can_show(ec) ||
(ec == e_comp_wl->drag_client))
ec->visible = EINA_TRUE;
ec->ignored = 0;
evas_object_show(ec->frame);
- cdata->mapped = 1;
+ ec->comp_data->mapped = 1;
}
}
- if (cdata->sub.below_obj && !evas_object_visible_get(cdata->sub.below_obj)
+ if (ec->comp_data->sub.below_obj && !evas_object_visible_get(ec->comp_data->sub.below_obj)
&& evas_object_visible_get(ec->frame))
- evas_object_show(cdata->sub.below_obj);
+ evas_object_show(ec->comp_data->sub.below_obj);
}
ec->ignored = ignored;
e_comp_wl_buffer_get(struct wl_resource *resource, E_Client *ec)
{
E_Comp_Wl_Buffer *buffer = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
struct wl_listener *listener;
struct wl_shm_buffer *shmbuff;
Eina_Bool res;
}
else
{
- cdata = e_client_cdata_get(ec);
- if ((ec) && (cdata->video_client))
+ if ((ec) && (ec->comp_data->video_client))
{
buffer->type = E_COMP_WL_BUFFER_TYPE_VIDEO;
buffer->w = buffer->h = 1;
if (!tbm_surf)
goto err;
- cdata = e_client_cdata_get(ec);
- if ((ec) && (cdata->video_client))
+ if ((ec) && (ec->comp_data->video_client))
{
buffer->type = E_COMP_WL_BUFFER_TYPE_VIDEO;
buffer->w = buffer->h = 1;
uint32_t serial, keycode;
struct wl_client *wc = NULL;
E_Comp_Config *comp_conf = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
keycode = (ev->keycode - 8);
comp_conf = e_comp_config_get();
- if (ec && (cdata = e_client_cdata_get(ec)) && cdata->surface)
- wc = wl_resource_get_client(cdata->surface);
+ if (ec && ec->comp_data && ec->comp_data->surface)
+ wc = wl_resource_get_client(ec->comp_data->surface);
EINA_LIST_FOREACH(key_list, l, res)
{
e_comp_wl_key_down(Ecore_Event_Key *ev)
{
E_Client *ec = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
uint32_t keycode;
E_Comp_Wl_Key_Data *end, *k;
if ((!e_client_action_get()) && (!e_comp->input_key_grabs))
{
ec = e_client_focused_get();
- if (ec && (cdata = e_client_cdata_get(ec)) && cdata->surface && e_comp_wl->kbd.focused)
+ if (ec && ec->comp_data && ec->comp_data->surface && e_comp_wl->kbd.focused)
{
_e_comp_wl_key_send(ev, WL_KEYBOARD_KEY_STATE_PRESSED, e_comp_wl->kbd.focused, ec);
uint32_t serial, btn;
struct wl_resource *res;
E_Comp_Config *comp_conf = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (ec->cur_mouse_action || e_comp_wl->drag)
return EINA_FALSE;
e_comp_wl->ptr.button = btn;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return EINA_FALSE;
+ if (!ec->comp_data || !ec->comp_data->surface) return EINA_FALSE;
if (!eina_list_count(e_comp_wl->ptr.resources))
return EINA_TRUE;
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
comp_conf = e_comp_config_get();
uint32_t serial, wl_keycode;
enum wl_keyboard_key_state state;
E_Comp_Config *comp_conf = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata->surface, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data->surface, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
wl_keycode = keycode - 8;
EINA_SAFETY_ON_TRUE_RETURN_VAL(wl_keycode <= 0, EINA_FALSE);
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
if (!time) time = (uint32_t)(ecore_time_get() * 1000);
if (pressed) state = WL_KEYBOARD_KEY_STATE_PRESSED;
Eina_List *l;
uint32_t serial, wl_keycode, cancel_keycode;
E_Comp_Config *comp_conf = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata->surface, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data->surface, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl->xkb.keymap, EINA_FALSE);
wl_keycode = keycode - 8;
EINA_SAFETY_ON_TRUE_RETURN_VAL(wl_keycode <= 0, EINA_FALSE);
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
if (!time) time = (uint32_t)(ecore_time_get() * 1000);
struct wl_client *wc;
uint32_t serial;
E_Devicemgr_Input_Device *device = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata->surface, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data->surface, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
if (!dev) device = _e_comp_wl_device_last_device_get(ECORE_DEVICE_CLASS_TOUCH);
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
if (!time) time = (uint32_t)(ecore_time_get() * 1000);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
E_Devicemgr_Input_Device *device;
uint32_t serial;
struct wl_client *wc;
- E_Comp_Wl_Client_Data *cdata = NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata->surface, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data->surface, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
if (!dev) device = _e_comp_wl_device_last_device_get(ECORE_DEVICE_CLASS_TOUCH);
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
if (!time) time = (uint32_t)(ecore_time_get() * 1000);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
EINTERN Eina_Bool
e_comp_wl_touch_cancel_send(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
-
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
_e_comp_wl_send_touch_cancel(ec);
{
uint32_t serial;
struct wl_client *wc;
- E_Comp_Wl_Client_Data *cdata = NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata->surface, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data->surface, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
if (!time) time = (uint32_t)(ecore_time_get() * 1000);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
{
uint32_t serial;
struct wl_client *wc;
- E_Comp_Wl_Client_Data *cdata = NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata->surface, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data->surface, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
if (!time) time = (uint32_t)(ecore_time_get() * 1000);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
{
uint32_t serial;
struct wl_client *wc;
- E_Comp_Wl_Client_Data *cdata = NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata->surface, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data->surface, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
if (!time) time = (uint32_t)(ecore_time_get() * 1000);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
struct wl_client *wc;
struct wl_resource *res;
Eina_List *l;
- E_Comp_Wl_Client_Data *cdata = NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata->surface, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data->surface, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
EINA_SAFETY_ON_TRUE_RETURN_VAL(e_object_is_del(E_OBJECT(ec)), EINA_FALSE);
if (!eina_list_count(e_comp_wl->ptr.resources)) return EINA_FALSE;
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
{
if (dev) _e_comp_wl_send_event_device(wc, time, dev, serial);
else _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, time);
- wl_pointer_send_enter(res, serial, cdata->surface,
+ wl_pointer_send_enter(res, serial, ec->comp_data->surface,
wl_fixed_from_int(x),
wl_fixed_from_int(y));
}
EINTERN Eina_Bool
e_comp_wl_mouse_out_send(E_Client *ec, Ecore_Device *dev, uint32_t time)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
uint32_t serial;
struct wl_client *wc;
struct wl_resource *res;
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata->surface, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data->surface, EINA_FALSE);
EINA_SAFETY_ON_TRUE_RETURN_VAL(e_object_is_del(E_OBJECT(ec)), EINA_FALSE);
if (!eina_list_count(e_comp_wl->ptr.resources)) return EINA_FALSE;
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
{
if (dev) _e_comp_wl_send_event_device(wc, time, dev, serial);
else _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, time);
- wl_pointer_send_leave(res, serial, cdata->surface);
+ wl_pointer_send_leave(res, serial, ec->comp_data->surface);
}
return EINA_TRUE;
EINTERN Eina_Bool
e_comp_wl_cursor_hide(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
struct wl_resource *res;
struct wl_client *wc;
Eina_List *l;
if (!ec) return EINA_FALSE;
if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return EINA_FALSE;
- wc = wl_resource_get_client(cdata->surface);
+ if (!ec->comp_data || !ec->comp_data->surface) return EINA_FALSE;
+ wc = wl_resource_get_client(ec->comp_data->surface);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
{
if (!e_comp_wl_input_pointer_check(res)) continue;
if (wl_resource_get_client(res) != wc) continue;
if (ec->pointer_enter_sent == EINA_FALSE) continue;
- wl_pointer_send_leave(res, serial, cdata->surface);
+ wl_pointer_send_leave(res, serial, ec->comp_data->surface);
ec->pointer_enter_sent = EINA_FALSE;
}
Eina_List *l;
E_Comp_Wl_Output *output;
- if (!ec) return NULL;
- if (e_object_is_del(E_OBJECT(ec))) return NULL;
- if (!e_client_cdata_get(ec)) return NULL;
+ if (!ec || !ec->comp_data || e_object_is_del(E_OBJECT(ec))) return NULL;
EINA_LIST_FOREACH(e_comp_wl->outputs, l, output)
{
if (!ec) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- if (!e_client_cdata_get(ec)) return;
+ if (!ec->comp_data) return;
buffer = state->buffer;
if (!buffer) return;
EINTERN Eina_Bool
e_comp_wl_commit_sync_configure(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_List *l;
E_Client_Pending_Geometry *geo;
E_Client_Demand_Geometry change = 0;
if (!ec || !ec->frame) goto ret;
if (e_object_is_del(E_OBJECT(ec))) goto ret;
- cdata = e_client_cdata_get(ec);
- if (!cdata) goto ret;
bw = bh = 0;
config.x = ec->x; config.y = ec->y; config.w = ec->w; config.h = ec->h;
// cw interceptor(move,resize) won't work if wait_commit is TRUE
ec->surface_sync.wait_commit = EINA_FALSE;
- if (cdata->shell.surface && cdata->shell.configure)
+ if ((ec->comp_data->shell.surface) &&
+ (ec->comp_data->shell.configure))
{
- cdata->shell.configure(cdata->shell.surface,
+ ec->comp_data->shell.configure(ec->comp_data->shell.surface,
ec->x, ec->y,
ec->w, ec->h);
}
static void
_e_comp_wl_surface_output_viewport_get(E_Client *ec, Eina_Rectangle *out)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Comp_Wl_Subsurf_Data *sdata = NULL;
if (!out)
return;
- cdata = e_client_cdata_get(ec);
- if (!cdata)
+ if (!ec->comp_data)
return;
- sdata = cdata->sub.data;
+ sdata = ec->comp_data->sub.data;
if (sdata)
{
if (sdata->parent)
out->y = ec->y;
}
- out->w = cdata->width_from_viewport;
+ out->w = ec->comp_data->width_from_viewport;
out->w = (out->w + 1) & ~1;
- out->h = cdata->height_from_viewport;
+ out->h = ec->comp_data->height_from_viewport;
e_comp_object_frame_xy_unadjust(ec->frame, out->x, out->y, &out->x, &out->y);
e_comp_object_frame_wh_unadjust(ec->frame, out->w, out->h, &out->w, &out->h);
EINTERN Eina_Bool
e_comp_wl_surface_viewport_get(E_Client *ec, Eina_Rectangle *buffer_viewport, Eina_Rectangle *output_viewport, unsigned int *transform)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Comp_Wl_Buffer *buffer;
E_Comp_Wl_Buffer_Viewport *vp;
const Evas_Map *m;
if (e_object_is_del(E_OBJECT(ec)))
return EINA_FALSE;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return EINA_FALSE;
-
- vp = &cdata->scaler.buffer_viewport;
+ vp = &ec->comp_data->scaler.buffer_viewport;
if (buffer_viewport)
{
- buffer = cdata->buffer_ref.buffer;
+ buffer = ec->comp_data->buffer_ref.buffer;
/* Getting a viewport of buffer needs geometry of buffer. */
if (!buffer)
return EINA_FALSE;
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;
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 (!child_ec->comp_data) continue;
+ if (!child_ec->comp_data->mapped) continue;
if (child_ec->iconic && child_ec->exp_iconify.by_client)
continue;
if (e_comp_wl->selection.target && (!dropped))
{
struct wl_resource *res;
- E_Comp_Wl_Client_Data *selection_target_cdata = e_client_cdata_get(e_comp_wl->selection.target);
- res = e_comp_wl_data_find_for_client(wl_resource_get_client(selection_target_cdata->surface));
+
+ res = e_comp_wl_data_find_for_client(wl_resource_get_client(e_comp_wl->selection.target->comp_data->surface));
if (res)
{
wl_data_device_send_drop(res);
struct wl_resource *data_device_res, *offer_res;
uint32_t serial;
int x, y;
- E_Comp_Wl_Client_Data *cdata = NULL;
-
- cdata = e_client_cdata_get(ec);
{
data_device_res =
- e_comp_wl_data_find_for_client(wl_resource_get_client(cdata->surface));
+ e_comp_wl_data_find_for_client(wl_resource_get_client(ec->comp_data->surface));
if (!data_device_res) return;
offer_res = e_comp_wl_data_device_send_offer(ec);
if (e_comp_wl->drag_source)
x = wl_fixed_to_int(e_comp_wl->ptr.x) - e_comp_wl->selection.target->client.x;
y = wl_fixed_to_int(e_comp_wl->ptr.y) - e_comp_wl->selection.target->client.y;
serial = wl_display_next_serial(e_comp_wl->wl.disp);
- wl_data_device_send_enter(data_device_res, serial, cdata->surface,
+ wl_data_device_send_enter(data_device_res, serial, ec->comp_data->surface,
wl_fixed_from_int(x), wl_fixed_from_int(y), offer_res);
}
e_comp_wl_data_device_send_leave(E_Client *ec)
{
struct wl_resource *res;
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
evas_object_event_callback_del_full(ec->frame, EVAS_CALLBACK_DEL, _e_comp_wl_data_device_target_del, ec);
if (e_comp_wl->selection.target == ec)
e_comp_wl->selection.target = NULL;
- res = e_comp_wl_data_find_for_client(wl_resource_get_client(cdata->surface));
+ res = e_comp_wl_data_find_for_client(wl_resource_get_client(ec->comp_data->surface));
if (res)
wl_data_device_send_leave(res);
}
{
struct wl_resource *data_device_res, *offer_res = NULL;
E_Comp_Wl_Data_Source *source;
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
data_device_res =
- e_comp_wl_data_find_for_client(wl_resource_get_client(cdata->surface));
+ e_comp_wl_data_find_for_client(wl_resource_get_client(ec->comp_data->surface));
if (!data_device_res) return NULL;
source = e_comp_wl->drag_source;
if (source)
_e_comp_wl_input_pointer_map(struct wl_resource *resource)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Pointer *ptr;
struct wl_client *wc;
//if cursor ec have external content
e_comp_object_content_unset(ec->frame);
- if (!e_comp_wl->ptr.ec) return;
-
- cdata = e_client_cdata_get(e_comp_wl->ptr.ec);
- if (!cdata) return;
- if (!cdata->surface) return;
-
+ if (!e_comp_wl->ptr.ec || !e_comp_wl->ptr.ec->comp_data || !e_comp_wl->ptr.ec->comp_data->surface) return;
wc = wl_resource_get_client(resource);
- if (wc != wl_resource_get_client(cdata->surface)) return;
+ if (wc != wl_resource_get_client(e_comp_wl->ptr.ec->comp_data->surface)) return;
if (!e_comp_wl->ptr.ec->pointer_enter_sent) return;
if ((ptr = e_comp->pointer))
_e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resource *resource EINA_UNUSED, uint32_t serial EINA_UNUSED, struct wl_resource *surface_resource, int32_t x, int32_t y)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_Bool got_mouse = EINA_FALSE;
E_CLIENT_FOREACH(ec)
{
if (e_object_is_del(E_OBJECT(ec))) continue;
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) continue;
- cdata = e_client_cdata_get(ec);
- if (!cdata) continue;
- if (!cdata->surface) continue;
- if (client != wl_resource_get_client(cdata->surface)) continue;
+ if (!ec->comp_data->surface) continue;
+ if (client != wl_resource_get_client(ec->comp_data->surface)) continue;
if (ec->mouse.in && ec->pointer_enter_sent)
{
got_mouse = EINA_TRUE;
EC_CHANGED(ec);
/* Set fuctions to prevent unwanted handling by shell */
- cdata->shell.surface = surface_resource;
- cdata->shell.configure = _e_comp_wl_input_pointer_configure;
- cdata->shell.map = _e_comp_wl_input_pointer_map;
+ ec->comp_data->shell.surface = surface_resource;
+ ec->comp_data->shell.configure = _e_comp_wl_input_pointer_configure;
+ ec->comp_data->shell.map = _e_comp_wl_input_pointer_map;
e_client_layer_set(ec, E_LAYER_CLIENT_CURSOR);
ec->is_cursor = EINA_TRUE;
if ((e_comp_wl->ptr.num_devices == 1) && e_comp_wl->ptr.ec && !e_comp_wl->ptr.ec->pointer_enter_sent && !e_config->use_cursor_timer)
{
- cdata = e_client_cdata_get(e_comp_wl->ptr.ec);
+ cdata = (E_Comp_Wl_Client_Data*)e_comp_wl->ptr.ec->comp_data;
if (cdata && cdata->wl_surface)
ptr_client = wl_resource_get_client(cdata->wl_surface);
void
e_comp_wl_input_keyboard_enter_send(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
struct wl_resource *res;
Eina_List *l;
uint32_t serial;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- if (!cdata->surface) return;
+ if (!ec->comp_data->surface) return;
if (!e_comp_wl->kbd.focused) return;
EINA_LIST_FOREACH(e_comp_wl->kbd.focused, l, res)
{
- wl_keyboard_send_enter(res, serial, cdata->surface,
+ wl_keyboard_send_enter(res, serial, ec->comp_data->surface,
&e_comp_wl->kbd.keys);
wl_keyboard_send_modifiers(res, serial,
e_comp_wl->kbd.mod_depressed,
_e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *resource, uint32_t id)
{
E_Client *focused;
- E_Comp_Wl_Client_Data *focused_cdata = NULL;
struct wl_resource *res;
/* try to create keyboard resource */
/* if the client owns the focused surface, we need to send an enter */
focused = e_client_focused_get();
- if ((!focused) || (e_object_is_del(E_OBJECT(focused)))) return;
- focused_cdata = e_client_cdata_get(focused);
- if ((!focused_cdata) || (!focused_cdata->surface)) return;
+ if ((!focused) || (e_object_is_del(E_OBJECT(focused))) ||
+ (!focused->comp_data) || (!focused->comp_data->surface)) return;
- if (client != wl_resource_get_client(focused_cdata->surface)) return;
+ if (client != wl_resource_get_client(focused->comp_data->surface)) return;
e_comp_wl->kbd.focused = eina_list_append(e_comp_wl->kbd.focused, res);
e_comp_wl_input_keyboard_enter_send(focused);
_remote_provider_rect_add(E_Comp_Wl_Remote_Provider *provider, Eina_Rectangle *rect)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
ec = provider->common.ec;
if (!ec) return;
+ if (!ec->comp_data) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
-
- cdata->remote_surface.regions =
- eina_list_remove(cdata->remote_surface.regions,
+ ec->comp_data->remote_surface.regions =
+ eina_list_remove(ec->comp_data->remote_surface.regions,
rect);
- cdata->remote_surface.regions =
- eina_list_append(cdata->remote_surface.regions,
+ ec->comp_data->remote_surface.regions =
+ eina_list_append(ec->comp_data->remote_surface.regions,
rect);
}
_remote_provider_rect_del(E_Comp_Wl_Remote_Provider *provider, Eina_Rectangle *rect)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
ec = provider->common.ec;
if (!ec) return;
+ if (!ec->comp_data) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
-
- cdata->remote_surface.regions =
- eina_list_remove(cdata->remote_surface.regions,
+ ec->comp_data->remote_surface.regions =
+ eina_list_remove(ec->comp_data->remote_surface.regions,
rect);
}
_remote_provider_rect_clear(E_Comp_Wl_Remote_Provider *provider)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
ec = provider->common.ec;
if (!ec) return;
-
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ if (!ec->comp_data) return;
/* TODO : remove it from here after supporting multiple onscreen surface */
_remote_surface_region_clear(provider->onscreen_parent);
- cdata->remote_surface.regions =
- eina_list_remove_list(cdata->remote_surface.regions,
- cdata->remote_surface.regions);
+ ec->comp_data->remote_surface.regions =
+ eina_list_remove_list(ec->comp_data->remote_surface.regions,
+ ec->comp_data->remote_surface.regions);
}
static void
_remote_provider_onscreen_parent_set(E_Comp_Wl_Remote_Provider *provider, E_Comp_Wl_Remote_Surface *parent)
{
E_Comp_Wl_Remote_Region *region;
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_List *l;
if (!provider) return;
_remote_provider_rect_clear(provider);
- cdata = e_client_cdata_get(provider->common.ec);
- if (!cdata) return;
-
provider->onscreen_parent = parent;
- cdata->remote_surface.onscreen_parent = NULL;
+ provider->common.ec->comp_data->remote_surface.onscreen_parent = NULL;
RSMDBG("set onscreen_parent %p(ec:%p)",
provider->common.ec, "PROVIDER", provider,
_remote_provider_rect_add(provider, ®ion->geometry);
}
- cdata->remote_surface.onscreen_parent = parent->ec;
+ provider->common.ec->comp_data->remote_surface.onscreen_parent = parent->ec;
}
}
ec = provider->common.ec;
if (!ec) return;
- if (!e_client_cdata_get(ec)) return;
+ if (!ec->comp_data) return;
if (!provider->common.surfaces) return;
o = evas_object_top_get(e_comp->evas);
(_ec->visibility.obscured != E_VISIBILITY_PARTIALLY_OBSCURED))
continue;
/* if _ec is subsurface, skip this */
- cdata = e_client_cdata_get(_ec);
+ cdata = (E_Comp_Wl_Client_Data *)_ec->comp_data;
if (cdata && cdata->sub.data) continue;
if (!E_INTERSECTS(_ec->x, _ec->y, _ec->w, _ec->h, ec->zone->x, ec->zone->y, ec->zone->w, ec->zone->h))
_remote_provider_offscreen_set(E_Comp_Wl_Remote_Provider* provider, Eina_Bool set)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
EINA_SAFETY_ON_NULL_RETURN(provider);
EINA_SAFETY_ON_NULL_RETURN(provider->common.ec);
provider->common.is_offscreen = set;
ec->ignored = EINA_TRUE;
- cdata = e_client_cdata_get(ec);
//TODO: consider what happens if it's not normal client such as subsurface client
//TODO: save original values
- if ((cdata->shell.surface) && (cdata->shell.unmap))
+ if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap))
{
ELOGF("COMP", "Call shell.unmap by rsm", ec);
- cdata->shell.unmap(cdata->shell.surface);
+ ec->comp_data->shell.unmap(ec->comp_data->shell.surface);
}
else
{
ec->visible = EINA_FALSE;
evas_object_hide(ec->frame);
- cdata->mapped = 0;
+ ec->comp_data->mapped = 0;
}
ec->icccm.accepts_focus = ec->icccm.take_focus = ec->want_focus = EINA_FALSE;
if (!ec) return NULL;
- cdata = e_client_cdata_get(ec);
+ cdata = ec->comp_data;
if (!cdata) return NULL;
return cdata->buffer_ref.buffer;
static void
_remote_surface_bind_client(E_Comp_Wl_Remote_Surface *remote_surface, E_Client *ec)
{
- E_Comp_Wl_Client_Data *bind_ec_cdata = NULL;
- E_Comp_Wl_Client_Data *provider_ec_cdata = NULL;
-
if (!remote_surface) return;
if ((ec) && (remote_surface->bind_ec == ec)) return;
if (remote_surface->provider && remote_surface->provider->common.ec)
e_client_base_output_resolution_rsm_update(remote_surface->bind_ec, remote_surface->provider->common.ec);
- bind_ec_cdata = e_client_cdata_get(remote_surface->bind_ec);
- bind_ec_cdata->pending.sx = 0;
- bind_ec_cdata->pending.sy = 0;
- bind_ec_cdata->pending.new_attach = EINA_TRUE;
+ remote_surface->bind_ec->comp_data->pending.sx = 0;
+ remote_surface->bind_ec->comp_data->pending.sy = 0;
+ remote_surface->bind_ec->comp_data->pending.new_attach = EINA_TRUE;
e_comp_wl_surface_attach(remote_surface->bind_ec, NULL);
e_comp_object_render_update_del(remote_surface->bind_ec->frame);
buffer = _remote_surface_comp_wl_buffer_get(remote_surface->provider->common.ec);
EINA_SAFETY_ON_NULL_RETURN(buffer);
- bind_ec_cdata = e_client_cdata_get(remote_surface->bind_ec);
- provider_ec_cdata = e_client_cdata_get(remote_surface->provider->common.ec);
+ _e_comp_wl_remote_surface_state_buffer_set(&remote_surface->bind_ec->comp_data->pending, buffer);
- _e_comp_wl_remote_surface_state_buffer_set(&bind_ec_cdata->pending, buffer);
- bind_ec_cdata->pending.sx = 0;
- bind_ec_cdata->pending.sy = 0;
- bind_ec_cdata->pending.new_attach = EINA_TRUE;
- bind_ec_cdata->pending.buffer_viewport = provider_ec_cdata->scaler.buffer_viewport;
+ remote_surface->bind_ec->comp_data->pending.sx = 0;
+ remote_surface->bind_ec->comp_data->pending.sy = 0;
+ remote_surface->bind_ec->comp_data->pending.new_attach = EINA_TRUE;
+
+ remote_surface->bind_ec->comp_data->pending.buffer_viewport =
+ remote_surface->provider->common.ec->comp_data->scaler.buffer_viewport;
/* check the base_output resolution */
e_client_base_output_resolution_rsm_update(ec, remote_surface->provider->common.ec);
E_Comp_Wl_Remote_Provider *provider = NULL;
E_Comp_Wl_Remote_Source *source = NULL;
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
int version;
pid_t pid = 0;
uid_t uid = 0;
if (version >= TIZEN_REMOTE_SURFACE_CHANGED_BUFFER_SINCE_VERSION)
{
- cdata = e_client_cdata_get(ec);
- if (cdata && cdata->sub.data)
+ if ((ec->comp_data) && (ec->comp_data->sub.data))
{
ERR("Subsurface could not be source client");
goto fail;
E_Comp_Wl_Remote_Provider *provider = NULL;
E_Comp_Wl_Remote_Source *source = NULL;
E_Client *ec, *provider_ec;
- E_Comp_Wl_Client_Data *provider_cdata = NULL;
Eina_List *surfaces;
int version;
pid_t pid = 0;
if (version >= TIZEN_REMOTE_SURFACE_CHANGED_BUFFER_SINCE_VERSION)
{
- provider_cdata = e_client_cdata_get(provider_ec);
- if (provider_cdata && provider_cdata->sub.data)
+ if ((provider_ec->comp_data) && (provider_ec->comp_data->sub.data))
{
ERR("Subsurface could not be source client");
goto fail;
int x = 0, y = 0, sx = 0, sy = 0;
E_Comp_Wl_Buffer *buffer;
Eina_List *l, *ll;
- E_Comp_Wl_Client_Data *cdata = NULL;
- E_Comp_Wl_Client_Data *bind_ec_cdata = NULL;
- E_Comp_Wl_Buffer_Viewport *vp = NULL;
+ E_Comp_Wl_Buffer_Viewport *vp = &ec->comp_data->scaler.buffer_viewport;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
-
- vp = &cdata->scaler.buffer_viewport;
-
if (vp->buffer.transform != state->buffer_viewport.buffer.transform)
{
int transform_change = (4 + state->buffer_viewport.buffer.transform - vp->buffer.transform) & 0x3;
vp->wait_for_transform_change = 0;
}
- cdata->scaler.buffer_viewport = state->buffer_viewport;
+ ec->comp_data->scaler.buffer_viewport = state->buffer_viewport;
if (state->new_attach)
e_comp_wl_surface_attach(ec, state->buffer);
ec->client.h = state->bh;
e_client_size_set(ec, state->bw, state->bh);
- if ((cdata->shell.surface) && (cdata->shell.configure))
- cdata->shell.configure(cdata->shell.surface, x, y, ec->w, ec->h);
+ if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.configure))
+ ec->comp_data->shell.configure(ec->comp_data->shell.surface,
+ x, y, ec->w, ec->h);
}
sx = state->sx;
state->new_attach = EINA_FALSE;
/* send previous frame done */
- EINA_LIST_FOREACH_SAFE(cdata->frames, l, ll, cb)
+ EINA_LIST_FOREACH_SAFE(ec->comp_data->frames, l, ll, cb)
{
wl_callback_send_done(cb, (unsigned int)(ecore_loop_time_get() * 1000));
wl_resource_destroy(cb);
}
- cdata->frames = eina_list_merge(cdata->frames, state->frames);
+ ec->comp_data->frames = eina_list_merge(ec->comp_data->frames,
+ state->frames);
state->frames = NULL;
/* clear stored damages... */
EINA_LIST_FOREACH(provider->common.surfaces, l, surface)
{
if (!surface->redirect) continue;
- if (!surface->bind_ec)
+ if (surface->bind_ec)
+ {
+ surface->bind_ec->comp_data->pending.buffer_viewport = ec->comp_data->scaler.buffer_viewport;
+
+ _e_comp_wl_remote_surface_state_buffer_set(&surface->bind_ec->comp_data->pending, buffer);
+ surface->bind_ec->comp_data->pending.sx = sx;
+ surface->bind_ec->comp_data->pending.sy = sy;
+ surface->bind_ec->comp_data->pending.new_attach = EINA_TRUE;
+
+ e_comp_wl_surface_commit(surface->bind_ec);
+
+ /* need to prepare hwc whenever buffer changed */
+ e_comp_render_queue();
+ }
+ else
{
_remote_surface_changed_buff_protocol_send(surface,
TIZEN_REMOTE_SURFACE_BUFFER_TYPE_TBM,
0,
EINA_TRUE,
buffer, NULL, EINA_FALSE);
- continue;
}
-
- bind_ec_cdata = e_client_cdata_get(surface->bind_ec);
- if (!bind_ec_cdata) continue;
-
- bind_ec_cdata->pending.buffer_viewport = bind_ec_cdata->scaler.buffer_viewport;
- _e_comp_wl_remote_surface_state_buffer_set(&bind_ec_cdata->pending, buffer);
- bind_ec_cdata->pending.sx = sx;
- bind_ec_cdata->pending.sy = sy;
- bind_ec_cdata->pending.new_attach = EINA_TRUE;
-
- e_comp_wl_surface_commit(surface->bind_ec);
-
- /* need to prepare hwc whenever buffer changed */
- e_comp_render_queue();
}
}
else if ((source = _remote_source_find(ec)))
int x, y, w, h;
Eina_Bool first_skip = EINA_TRUE;
E_Comp_Wl_Buffer *buffer;
- E_Comp_Wl_Client_Data *cdata = NULL;
- E_Comp_Wl_Client_Data *common_cdata = NULL;
-
- if (!ec) return EINA_FALSE;
-
- cdata = e_client_cdata_get(ec);
- if (!cdata) return EINA_FALSE;
if (!e_comp_wl_subsurface_commit(ec)) return EINA_FALSE;
if (!evas_object_visible_get(ec->frame)) return EINA_TRUE;
- sdata = cdata->sub.data;
+ sdata = ec->comp_data->sub.data;
evas_object_geometry_get(ec->frame, &fx, &fy, &fw, &fh);
- common_cdata = e_client_cdata_get(parent_provider->common.ec);
- EINA_LIST_FOREACH(common_cdata->remote_surface.regions, l, rect)
+ EINA_LIST_FOREACH(parent_provider->common.ec->comp_data->remote_surface.regions, l, rect)
{
E_Comp_Wl_Remote_Region *region;
continue;
}
- w = cdata->width_from_viewport;
- h = cdata->height_from_viewport;
+ w = ec->comp_data->width_from_viewport;
+ h = ec->comp_data->height_from_viewport;
/* consider scale?
* w = (int) (w * ((double)rect->w / parent_provider->ec->w));
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, NULL);
EINA_SAFETY_ON_TRUE_RETURN_VAL(e_object_is_del(E_OBJECT(ec)), NULL);
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_client_cdata_get(ec), NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, NULL);
remote_surface = eina_hash_find(_rsm->bind_surface_hash, &ec);
if (!remote_surface || !remote_surface->provider) return NULL;
EINTERN Eina_Bool
e_comp_wl_remote_surface_commit(E_Client *ec)
{
- E_Comp_Wl_Client_Data *parent_cdata = NULL;
E_Comp_Wl_Remote_Provider *provider;
E_Comp_Wl_Remote_Source *source = NULL;
E_Comp_Wl_Subsurf_Data *sdata, *ssdata;
E_Client *offscreen_parent;
- E_Comp_Wl_Client_Data *cdata = NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
EINA_SAFETY_ON_TRUE_RETURN_VAL(e_object_is_del(E_OBJECT(ec)), EINA_FALSE);
-
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
source = _remote_source_find(ec);
if (source)
{
if (source->common.is_offscreen)
{
- _e_comp_wl_remote_surface_state_commit(ec, &cdata->pending);
+ _e_comp_wl_remote_surface_state_commit(ec, &ec->comp_data->pending);
return EINA_TRUE;
}
//send update to remote_surface of source client
- _e_comp_wl_remote_surface_source_update(source, cdata->pending.buffer, EINA_TRUE);
+ _e_comp_wl_remote_surface_source_update(source, ec->comp_data->pending.buffer, EINA_TRUE);
//do normal commit callback process
return EINA_FALSE;
}
/* subsurface case */
- if ((sdata = cdata->sub.data))
+ if ((sdata = ec->comp_data->sub.data))
{
/* check for valid subcompositor data */
if (!sdata->parent)
return EINA_FALSE;
- if (e_object_is_del(E_OBJECT(sdata->parent)))
+ if (!sdata->parent->comp_data)
return EINA_FALSE;
- parent_cdata = e_client_cdata_get(sdata->parent);
- if (!parent_cdata)
+ if (e_object_is_del(E_OBJECT(sdata->parent)))
return EINA_FALSE;
- if (!(ssdata = parent_cdata->sub.data))
+ if (!(ssdata = sdata->parent->comp_data->sub.data))
return EINA_FALSE;
if (!ssdata->remote_surface.offscreen_parent)
if (!(provider = _remote_provider_find(ec)))
return EINA_FALSE;
- _e_comp_wl_remote_surface_state_commit(ec, &cdata->pending);
+ _e_comp_wl_remote_surface_state_commit(ec, &ec->comp_data->pending);
return EINA_TRUE;
}
EINTERN Eina_Bool
e_shell_e_client_shell_assignable_check(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
-
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
if (e_object_is_del(E_OBJECT(ec)))
ec);
return EINA_FALSE;
}
-
- cdata = e_client_cdata_get(ec);
- if (!cdata)
+ else if (!ec->comp_data)
{
- ELOGF("SHELL", "ERR: Could not assign shell: No E_Comp_Wl_Client_Data",
+ ELOGF("SHELL", "ERR: Could not assign shell: No E_Comp_Client_Data",
ec);
return EINA_FALSE;
}
-
- if (cdata->shell.surface)
+ else if (ec->comp_data->shell.surface)
{
ELOGF("SHELL", "ERR: Could not assign shell: Already assigned",
ec);
struct wl_resource *shsurface,
E_Shell_Surface_Api *api)
{
- E_Comp_Wl_Client_Data *cdata;
+ E_Comp_Client_Data *cdata;
EINA_SAFETY_ON_NULL_RETURN(ec);
EINA_SAFETY_ON_NULL_RETURN(shsurface);
- cdata = e_client_cdata_get(ec);
+ cdata = ec->comp_data;
if (!cdata)
{
- ELOGF("SHELL", "ERR: E_Client must have E_Comp_Wl_Client_Data",
+ ELOGF("SHELL", "ERR: E_Client must have E_Comp_Client_Data",
ec);
return;
}
EINTERN void
e_shell_e_client_shsurface_api_set(E_Client *ec, E_Shell_Surface_Api *api)
{
- E_Comp_Wl_Client_Data *cdata;
+ E_Comp_Client_Data *cdata;
EINA_SAFETY_ON_NULL_RETURN(ec);
EINA_SAFETY_ON_NULL_RETURN(api);
- cdata = e_client_cdata_get(ec);
+ cdata = ec->comp_data;
if (!cdata)
{
- ELOGF("SHELL", "ERR: E_Client must have E_Comp_Wl_Client_Data",
+ ELOGF("SHELL", "ERR: E_Client must have E_Comp_Client_Data",
ec);
return;
}
EINTERN void
e_shell_e_client_toplevel_set(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata;
-
EINA_SAFETY_ON_NULL_RETURN(ec);
ELOGF("SHELL", "Set toplevel", ec);
- cdata = e_client_cdata_get(ec);
- if (!cdata)
- {
- ELOGF("SHELL", "ERR: E_Client must have E_Comp_Wl_Client_Data",
- ec);
- return;
- }
-
/* set toplevel client properties */
if (!ec->internal)
ec->borderless = 1;
ec->border.changed = ec->changes.border = !ec->borderless;
if (ec->netwm.type == E_WINDOW_TYPE_UNKNOWN)
ec->netwm.type = E_WINDOW_TYPE_NORMAL;
- cdata->set_win_type = EINA_TRUE;
+ ec->comp_data->set_win_type = EINA_TRUE;
}
EINTERN void
e_shell_e_client_popup_set(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata;
-
EINA_SAFETY_ON_NULL_RETURN(ec);
ELOGF("SHELL", "Set popup", ec);
- cdata = e_client_cdata_get(ec);
- if (!cdata)
- {
- ELOGF("SHELL", "ERR: E_Client must have E_Comp_Wl_Client_Data",
- ec);
- return;
- }
-
EC_CHANGED(ec);
ec->new_client = ec->override = 1;
e_client_unignore(ec);
ec->border.changed = ec->changes.border = !ec->borderless;
ec->changes.icon = !!ec->icccm.class;
ec->netwm.type = E_WINDOW_TYPE_POPUP_MENU;
- cdata->set_win_type = EINA_TRUE;
+ ec->comp_data->set_win_type = EINA_TRUE;
e_client_layer_set(ec, E_LAYER_CLIENT_POPUP);
}
EINTERN void
e_shell_e_client_destroy(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
-
EINA_SAFETY_ON_NULL_RETURN(ec);
ELOGF("SHELL", "Destroy shell surface", ec);
if (e_object_unref(E_OBJECT(ec)) == 0)
return;
- cdata = e_client_cdata_get(ec);
- if (!e_object_is_del(E_OBJECT(ec)) && !cdata)
+ if (!e_object_is_del(E_OBJECT(ec)))
{
- if (cdata->mapped)
+ if (ec->comp_data->mapped)
{
- if ((cdata->shell.surface) &&
- (cdata->shell.unmap))
+ if ((ec->comp_data->shell.surface) &&
+ (ec->comp_data->shell.unmap))
{
ELOGF("SHELL", "Call shell.unmap by destory surface", ec);
- cdata->shell.unmap(cdata->shell.surface);
+ ec->comp_data->shell.unmap(ec->comp_data->shell.surface);
}
}
e_policy_client_unmap(ec);
}
- if (cdata)
- cdata->shell.surface = NULL;
+ if (ec->comp_data)
+ ec->comp_data->shell.surface = NULL;
}
static void
_e_shell_surface_cb_popup_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *seat_resource EINA_UNUSED, uint32_t serial EINA_UNUSED, struct wl_resource *parent_resource, int32_t x, int32_t y, uint32_t flags EINA_UNUSED)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata;
if (!(ec = wl_resource_get_user_data(resource)))
{
return;
}
- cdata = e_client_cdata_get(ec);
- if (cdata)
+ if (ec->comp_data)
{
- cdata->popup.x = x;
- cdata->popup.y = y;
+ ec->comp_data->popup.x = x;
+ ec->comp_data->popup.y = y;
}
if (!ec->internal)
ec->border.changed = ec->changes.border = !ec->borderless;
ec->changes.icon = !!ec->icccm.class;
ec->netwm.type = E_WINDOW_TYPE_POPUP_MENU;
- if (cdata)
- cdata->set_win_type = EINA_TRUE;
+ if (ec->comp_data)
+ ec->comp_data->set_win_type = EINA_TRUE;
ec->layer = E_LAYER_CLIENT_POPUP;
/* set this client as a transient for parent */
_e_shell_surface_configure(struct wl_resource *resource, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!resource) return;
return;
}
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
-
if (ec->parent)
{
if ((ec->netwm.type == E_WINDOW_TYPE_MENU) ||
(ec->netwm.type == E_WINDOW_TYPE_POPUP_MENU) ||
(ec->netwm.type == E_WINDOW_TYPE_DROPDOWN_MENU))
{
- x = E_CLAMP(ec->parent->client.x + cdata->popup.x,
+ x = E_CLAMP(ec->parent->client.x + ec->comp_data->popup.x,
ec->parent->client.x,
ec->parent->client.x +
ec->parent->client.w - ec->client.w);
- y = E_CLAMP(ec->parent->client.y + cdata->popup.y,
+ y = E_CLAMP(ec->parent->client.y + ec->comp_data->popup.y,
ec->parent->client.y,
ec->parent->client.y +
ec->parent->client.h - ec->client.h);
_e_shell_surface_ping(struct wl_resource *resource)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
uint32_t serial;
if (!resource)
return;
}
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
-
serial = wl_display_next_serial(e_comp_wl->wl.disp);
- wl_shell_surface_send_ping(cdata->shell.surface, serial);
+ wl_shell_surface_send_ping(ec->comp_data->shell.surface, serial);
}
static void
_e_shell_client_map_common_pre(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
-
if (!ec) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
e_comp_object_signal_emit(ec->frame, "e,state,map", "e");
/* map this surface if needed */
ec->visible = EINA_TRUE;
evas_object_show(ec->frame);
- cdata->mapped = EINA_TRUE;
+ ec->comp_data->mapped = EINA_TRUE;
}
static void
_e_shell_client_map_common_post(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
-
if (!ec) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
if ((!ec->iconic) && (!e_client_util_ignored_get(ec)))
{
ec->post_raise = EINA_FALSE;
}
- if (!cdata->sub.data)
+ if (!ec->comp_data->sub.data)
{
if (ec->post_lower)
{
_e_shell_surface_map(struct wl_resource *resource)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!resource)
return;
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 ((!ec->comp_data->mapped) && (e_pixmap_usable_get(ec->pixmap)))
{
ELOGF("SHELL",
"Map window |win:0x%08x|ec_size:%d,%d|pid:%d|title:%s, name:%s",
_e_xdg_shell_surface_cb_parent_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *parent_resource)
{
E_Client *ec, *pc;
- E_Comp_Wl_Client_Data *parent_cdata = NULL;
if (!(ec = wl_resource_get_user_data(resource)))
{
ERR("Could not get parent resource clinet");
return;
}
- parent_cdata = e_client_cdata_get(pc);
- if (!parent_cdata) return;
- parent_resource = parent_cdata->surface;
+ if (!pc->comp_data) return;
+ parent_resource = pc->comp_data->surface;
}
/* set this client as a transient for parent */
_e_xdg_shell_surface_cb_window_geometry_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, int32_t x, int32_t y, int32_t w, int32_t h)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata= NULL;
ec = wl_resource_get_user_data(resource);
if (!ec)
"No Client For Shell Surface");
return;
}
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
-
- EINA_RECTANGLE_SET(&cdata->shell.window, x, y, w, h);
+ EINA_RECTANGLE_SET(&ec->comp_data->shell.window, x, y, w, h);
}
static void
_e_xdg_shell_surface_configure(struct wl_resource *resource, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata= NULL;
if (!resource) return;
(ec->netwm.type == E_WINDOW_TYPE_POPUP_MENU) ||
(ec->netwm.type == E_WINDOW_TYPE_DROPDOWN_MENU))
{
- cdata = e_client_cdata_get(ec);
- if (cdata)
- {
- x = E_CLAMP(ec->parent->client.x + cdata->popup.x,
- ec->parent->client.x,
- ec->parent->client.x +
- ec->parent->client.w - ec->client.w);
- y = E_CLAMP(ec->parent->client.y + cdata->popup.y,
- ec->parent->client.y,
- ec->parent->client.y +
- ec->parent->client.h - ec->client.h);
- }
+ x = E_CLAMP(ec->parent->client.x + ec->comp_data->popup.x,
+ ec->parent->client.x,
+ ec->parent->client.x +
+ ec->parent->client.w - ec->client.w);
+ y = E_CLAMP(ec->parent->client.y + ec->comp_data->popup.y,
+ ec->parent->client.y,
+ ec->parent->client.y +
+ ec->parent->client.h - ec->client.h);
}
}
_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 ((!ec->comp_data->mapped) && (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",
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;
EINA_SAFETY_ON_NULL_RETURN(ec);
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN(cdata);
-
- if (cdata->mapped)
+ if (ec->comp_data->mapped)
{
ELOGF("SHELL", "Map window | Already mapped.", ec);
return;
EINTERN void
e_shell_e_client_unmap(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
E_FREE_FUNC(ec->map_timer, ecore_timer_del);
- cdata = e_client_cdata_get(ec);
- if (cdata->mapped)
+ if (ec->comp_data->mapped)
{
e_comp_object_signal_emit(ec->frame, "e,state,unmap", "e");
ec->visible = EINA_FALSE;
evas_object_hide(ec->frame);
- cdata->mapped = EINA_FALSE;
+ ec->comp_data->mapped = EINA_FALSE;
ec->visibility.last_sent_type = E_VISIBILITY_UNKNOWN;
ELOGF("SHELL",
_e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource EINA_UNUSED, uint32_t id, struct wl_resource *surface_resource, struct wl_resource *parent_resource, struct wl_resource *seat_resource EINA_UNUSED, uint32_t serial EINA_UNUSED, int32_t x, int32_t y)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata;
+ E_Comp_Client_Data *cdata;
struct wl_resource *shsurf_resource;
E_Shell_Surface_Api api = {
.configure_send = _e_xdg_shell_surface_configure_send,
/* set this client as a transient for parent */
e_shell_e_client_parent_set(ec, parent_resource);
- cdata = e_client_cdata_get(ec);
+ cdata = ec->comp_data;
if (ec->parent)
{
cdata->popup.x = E_CLAMP(x, 0, ec->parent->client.w);
_e_comp_wl_subsurface_restack_bg_rectangle(E_Client *ec)
{
E_Client *bottom = ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
- E_Comp_Wl_Client_Data *bottom_cdata = NULL;
- if (!ec) return;
- if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- if (!cdata->sub.below_obj) return;
+ if (!ec || !ec->comp_data || e_object_is_del(E_OBJECT(ec)))
+ return;
+
+ if (!ec->comp_data->sub.below_obj)
+ return;
while (bottom)
{
short layer = evas_object_layer_get(bottom->frame);
- if (evas_object_layer_get(cdata->sub.below_obj) != layer)
- evas_object_layer_set(cdata->sub.below_obj, layer);
-
- evas_object_stack_below(cdata->sub.below_obj, bottom->frame);
+ if (evas_object_layer_get(ec->comp_data->sub.below_obj) != layer)
+ evas_object_layer_set(ec->comp_data->sub.below_obj, layer);
- bottom_cdata = e_client_cdata_get(bottom);
- bottom = eina_list_nth(bottom_cdata->sub.below_list, 0);
+ evas_object_stack_below(ec->comp_data->sub.below_obj, bottom->frame);
+ bottom = eina_list_nth(bottom->comp_data->sub.below_list, 0);
}
}
_e_comp_wl_subsurface_restack(E_Client *ec)
{
E_Client *subc, *temp;
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_List *l;
- if (!ec) return;
- if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ if (!ec || !ec->comp_data || e_object_is_del(E_OBJECT(ec))) return;
- if (cdata->sub.restacking)
+ if (ec->comp_data->sub.restacking)
return;
- cdata->sub.restacking = EINA_TRUE;
+ ec->comp_data->sub.restacking = EINA_TRUE;
temp = ec;
- EINA_LIST_FOREACH(cdata->sub.list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc)
{
- if (!subc || e_object_is_del(E_OBJECT(subc))) continue;
- if (!e_client_cdata_get(subc)) continue;
+ if (!subc || !subc->comp_data || e_object_is_del(E_OBJECT(subc))) continue;
e_client_stack_above(subc, temp);
temp = subc;
}
temp = ec;
- EINA_LIST_REVERSE_FOREACH(cdata->sub.below_list, l, subc)
+ EINA_LIST_REVERSE_FOREACH(ec->comp_data->sub.below_list, l, subc)
{
- if (!subc || e_object_is_del(E_OBJECT(subc))) continue;
- if (!e_client_cdata_get(subc)) continue;
+ if (!subc || !subc->comp_data || e_object_is_del(E_OBJECT(subc))) continue;
e_client_stack_below(subc, temp);
temp = subc;
}
- EINA_LIST_FOREACH(cdata->sub.list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc)
_e_comp_wl_subsurface_restack(subc);
- EINA_LIST_REVERSE_FOREACH(cdata->sub.below_list, l, subc)
+ EINA_LIST_REVERSE_FOREACH(ec->comp_data->sub.below_list, l, subc)
_e_comp_wl_subsurface_restack(subc);
- cdata->sub.restacking = EINA_FALSE;
+ ec->comp_data->sub.restacking = EINA_FALSE;
}
static void
_e_comp_wl_subsurface_bg_evas_cb_resize(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!(ec = data)) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ if (!ec->comp_data) return;
- if (cdata->sub.below_obj)
- evas_object_resize(cdata->sub.below_obj, ec->w, ec->h);
+ if (ec->comp_data->sub.below_obj)
+ evas_object_resize(ec->comp_data->sub.below_obj, ec->w, ec->h);
}
static Eina_Bool
_e_comp_wl_subsurface_video_has(E_Client *ec)
{
E_Client *subc;
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_List *l;
if (!ec) return EINA_FALSE;
if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return EINA_FALSE;
+ if (!ec->comp_data) return EINA_FALSE;
- if ((cdata->video_client) ||
+ if ((ec->comp_data->video_client) ||
(e_client_video_hw_composition_check(ec)))
return EINA_TRUE;
- if (cdata->has_video_client)
+ if (ec->comp_data->has_video_client)
return EINA_TRUE;
- EINA_LIST_FOREACH(cdata->sub.below_list_pending, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.below_list_pending, l, subc)
if (_e_comp_wl_subsurface_video_has(subc))
return EINA_TRUE;
- EINA_LIST_FOREACH(cdata->sub.below_list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.below_list, l, subc)
if (_e_comp_wl_subsurface_video_has(subc))
return EINA_TRUE;
static void
_e_comp_wl_subsurface_below_obj_create(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
Evas_Object *below_obj;
short layer;
- if (!ec) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
-
/* create a bg rectangle if topmost window is 24 depth window */
below_obj = evas_object_rectangle_add(e_comp->evas);
EINA_SAFETY_ON_NULL_RETURN(below_obj);
if (evas_object_visible_get(ec->frame))
evas_object_show(below_obj);
- cdata->sub.below_obj = below_obj;
+ ec->comp_data->sub.below_obj = below_obj;
ELOGF("COMP", " |bg_rectangle(%p) created", ec, below_obj);
static void
_e_comp_wl_subsurface_below_obj_destroy(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
-
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
-
- ELOGF("COMP", " |bg_rectangle(%p) delete", ec, cdata->sub.below_obj);
- E_FREE_FUNC(cdata->sub.below_obj, evas_object_del);
+ ELOGF("COMP", " |bg_rectangle(%p) delete", ec, ec->comp_data->sub.below_obj);
+ E_FREE_FUNC(ec->comp_data->sub.below_obj, evas_object_del);
}
static void
_e_comp_wl_subsurface_check_below_bg_rectangle(E_Client *ec)
{
E_Client *topmost;
- E_Comp_Wl_Client_Data *topmost_cdata = NULL;
topmost = e_comp_wl_topmost_parent_get(ec);
if (!topmost)
return;
- if ((!topmost_cdata) ||
+ if ((!topmost->comp_data) ||
(e_object_is_del(E_OBJECT(topmost))))
return;
if (_e_comp_wl_subsurface_data_get(topmost))
return;
- if (topmost_cdata->sub.below_obj)
+ if (topmost->comp_data->sub.below_obj)
{
if ((topmost->argb) ||
- ((!topmost_cdata->sub.below_list) &&
- (!topmost_cdata->sub.below_list_pending) &&
+ ((!topmost->comp_data->sub.below_list) &&
+ (!topmost->comp_data->sub.below_list_pending) &&
(!_e_comp_wl_subsurface_video_has(topmost))))
{
ELOGF("COMP", "below_obj becomes useless. argb(%d)",
else
{
if ((!topmost->argb) &&
- ((topmost_cdata->sub.below_list) ||
- (topmost_cdata->sub.below_list_pending) ||
+ ((topmost->comp_data->sub.below_list) ||
+ (topmost->comp_data->sub.below_list_pending) ||
(_e_comp_wl_subsurface_video_has(topmost))))
{
ELOGF("COMP", "it has below subsurfaces and video.", topmost);
_e_comp_wl_subsurface_show(E_Client *ec)
{
E_Client *subc;
- E_Comp_Wl_Client_Data *cdata = NULL;
- E_Comp_Wl_Client_Data *subc_cdata = NULL;
Eina_List *l;
- if (!ec) return;
- if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ if (!ec->comp_data || e_object_is_del(E_OBJECT(ec))) return;
- EINA_LIST_FOREACH(cdata->sub.list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc)
{
- if (e_object_is_del(E_OBJECT(subc))) continue;
- subc_cdata = e_client_cdata_get(subc);
- if (!subc_cdata) continue;
+ if (!subc->comp_data || e_object_is_del(E_OBJECT(subc))) continue;
- if (e_pixmap_resource_get(subc->pixmap) && !subc_cdata->mapped)
+ if (e_pixmap_resource_get(subc->pixmap) && !subc->comp_data->mapped)
{
subc->visible = EINA_TRUE;
evas_object_show(subc->frame);
- subc_cdata->mapped = 1;
+ subc->comp_data->mapped = 1;
}
_e_comp_wl_subsurface_show(subc);
}
- EINA_LIST_FOREACH(cdata->sub.below_list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.below_list, l, subc)
{
- if (e_object_is_del(E_OBJECT(subc))) continue;
- subc_cdata = e_client_cdata_get(subc);
- if (!subc_cdata) continue;
+ if (!subc->comp_data || e_object_is_del(E_OBJECT(subc))) continue;
- if (e_pixmap_resource_get(subc->pixmap) && !subc_cdata->mapped)
+ if (e_pixmap_resource_get(subc->pixmap) && !subc->comp_data->mapped)
{
subc->visible = EINA_TRUE;
evas_object_show(subc->frame);
- subc_cdata->mapped = 1;
+ subc->comp_data->mapped = 1;
}
_e_comp_wl_subsurface_show(subc);
}
_e_comp_wl_subsurface_hide(E_Client *ec)
{
E_Client *subc;
- E_Comp_Wl_Client_Data *cdata = NULL;
- E_Comp_Wl_Client_Data *sub_cdata = NULL;
Eina_List *l;
- if (!ec) return;
- if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
-
- EINA_LIST_FOREACH(cdata->sub.list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc)
{
- sub_cdata = e_client_cdata_get(subc);
- if (!sub_cdata || !sub_cdata->sub.data) continue;
+ if (!subc->comp_data || !subc->comp_data->sub.data) continue;
- if (!sub_cdata->sub.data->stand_alone)
+ if (!subc->comp_data->sub.data->stand_alone)
{
- if (sub_cdata->mapped)
+ if (subc->comp_data->mapped)
{
subc->visible = EINA_FALSE;
evas_object_hide(subc->frame);
- sub_cdata->mapped = 0;
+ subc->comp_data->mapped = 0;
}
_e_comp_wl_subsurface_hide(subc);
}
}
- EINA_LIST_FOREACH(cdata->sub.below_list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.below_list, l, subc)
{
- sub_cdata = e_client_cdata_get(subc);
- if (!sub_cdata || !sub_cdata->sub.data) continue;
+ if (!subc->comp_data || !subc->comp_data->sub.data) continue;
- if (!sub_cdata->sub.data->stand_alone)
+ if (!subc->comp_data->sub.data->stand_alone)
{
- if (sub_cdata->mapped)
+ if (subc->comp_data->mapped)
{
subc->visible = EINA_FALSE;
evas_object_hide(subc->frame);
- sub_cdata->mapped = 0;
+ subc->comp_data->mapped = 0;
}
_e_comp_wl_subsurface_hide(subc);
}
_e_comp_wl_subsurface_invisible_parent_get(E_Client *ec)
{
E_Client *parent = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
- E_Comp_Wl_Client_Data *parent_cdata = NULL;
- if (!ec) return NULL;
- if (e_object_is_del(E_OBJECT(ec))) return NULL;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return NULL;
- if (!cdata->sub.data) return NULL;
+ if (!ec->comp_data || e_object_is_del(E_OBJECT(ec)) || !ec->comp_data->sub.data)
+ return NULL;
- parent = cdata->sub.data->parent;
+ parent = ec->comp_data->sub.data->parent;
while (parent)
{
/* in case of topmost */
- if (e_object_is_del(E_OBJECT(parent))) return NULL;
- parent_cdata = e_client_cdata_get(parent);
- if (!parent_cdata) return NULL;
+ if (e_object_is_del(E_OBJECT(parent)) || !parent->comp_data) return NULL;
- if (!parent_cdata->sub.data)
+ if (!parent->comp_data->sub.data)
return (!evas_object_visible_get(parent->frame)) ? parent : NULL;
if (!evas_object_visible_get(parent->frame)){
if (e_pixmap_resource_get(parent->pixmap))
return parent;
- if (!parent_cdata->sub.data->parent)
+ if (!parent->comp_data->sub.data->parent)
return parent;
}
- parent = parent_cdata->sub.data->parent;
+ parent = parent->comp_data->sub.data->parent;
}
return NULL;
_e_comp_wl_subsurface_order_commit_recursive(E_Client *ec)
{
E_Client *subc;
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_List *l;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return EINA_FALSE;
+ if (!ec->comp_data) return EINA_FALSE;
- if (!cdata->sub.list_changed)
+ if (!ec->comp_data->sub.list_changed)
return EINA_FALSE;
- cdata->sub.list_changed = EINA_FALSE;
+ ec->comp_data->sub.list_changed = EINA_FALSE;
/* TODO: need to check more complicated subsurface tree */
- EINA_LIST_FOREACH(cdata->sub.list_pending, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.list_pending, l, subc)
{
- cdata->sub.list = eina_list_remove(cdata->sub.list, subc);
- cdata->sub.list = eina_list_append(cdata->sub.list, subc);
+ ec->comp_data->sub.list = eina_list_remove(ec->comp_data->sub.list, subc);
+ ec->comp_data->sub.list = eina_list_append(ec->comp_data->sub.list, subc);
_e_comp_wl_subsurface_order_commit_recursive(subc);
}
- EINA_LIST_FOREACH(cdata->sub.below_list_pending, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.below_list_pending, l, subc)
{
- cdata->sub.below_list = eina_list_remove(cdata->sub.below_list, subc);
- cdata->sub.below_list = eina_list_append(cdata->sub.below_list, subc);
+ ec->comp_data->sub.below_list = eina_list_remove(ec->comp_data->sub.below_list, subc);
+ ec->comp_data->sub.below_list = eina_list_append(ec->comp_data->sub.below_list, subc);
_e_comp_wl_subsurface_order_commit_recursive(subc);
}
static void
_e_comp_wl_subsurface_commit_to_cache(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata;
+ E_Comp_Client_Data *cdata;
E_Comp_Wl_Subsurf_Data *sdata;
struct wl_resource *cb;
Eina_List *l, *ll;
Eina_Iterator *itr;
Eina_Rectangle *rect;
- if (!(cdata = e_client_cdata_get(ec))) return;
+ if (!(cdata = ec->comp_data)) return;
sdata = _e_comp_wl_subsurface_data_get(ec);
EINA_SAFETY_ON_NULL_RETURN(sdata);
static void
_e_comp_wl_subsurface_commit_from_cache(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Comp_Wl_Subsurf_Data *sdata;
sdata = _e_comp_wl_subsurface_data_get(ec);
if (!e_comp_object_damage_exists(ec->frame))
{
- cdata = e_client_cdata_get(ec);
- if ((cdata->video_client) ||
+ if ((ec->comp_data->video_client) ||
(!e_client_video_hw_composition_check(ec)))
e_pixmap_image_clear(ec->pixmap, 1);
}
static void
_e_comp_wl_subsurface_synchronized_commit(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Comp_Wl_Subsurf_Data *sdata;
E_Client *subc;
Eina_List *l;
if (sdata->cached.has_data)
_e_comp_wl_subsurface_commit_from_cache(ec);
- cdata = e_client_cdata_get(ec);
- EINA_LIST_FOREACH(cdata->sub.list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc)
{
if (ec != subc)
_e_comp_wl_subsurface_parent_commit(subc, EINA_TRUE);
}
- EINA_LIST_FOREACH(cdata->sub.below_list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.below_list, l, subc)
{
if (ec != subc)
_e_comp_wl_subsurface_parent_commit(subc, EINA_TRUE);
_e_comp_wl_subsurface_parent_commit(E_Client *ec, Eina_Bool parent_synchronized)
{
E_Client *parent;
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Comp_Wl_Subsurf_Data *sdata;
- if (!ec) return;
- if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ if (!ec || e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) return;
sdata = _e_comp_wl_subsurface_data_get(ec);
EINA_SAFETY_ON_NULL_RETURN(sdata);
_e_comp_wl_subsurface_cb_position_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, int32_t x, int32_t y)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Comp_Wl_Subsurf_Data *sdata;
DBG("Subsurface Cb Position Set: %d", wl_resource_get_id(resource));
ec = wl_resource_get_user_data(resource);
- if (!ec) return;
- if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+
+ if (e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) return;
sdata = _e_comp_wl_subsurface_data_get(ec);
EINA_SAFETY_ON_NULL_RETURN(sdata);
{
E_Client *parent, *sibling;
Eina_List *l;
- E_Comp_Wl_Client_Data *ec1_cdata = e_client_cdata_get(ec1);
- E_Comp_Wl_Client_Data *parent_cdata;
- parent = ec1_cdata->sub.data->parent;
+ parent = ec1->comp_data->sub.data->parent;
if (parent == ec2)
return EINA_TRUE;
- parent_cdata = e_client_cdata_get(parent);
-
- EINA_LIST_FOREACH(parent_cdata->sub.list_pending, l, sibling)
+ EINA_LIST_FOREACH(parent->comp_data->sub.list_pending, l, sibling)
{
if ((sibling != ec1) && (sibling == ec2))
return EINA_TRUE;
}
- EINA_LIST_FOREACH(parent_cdata->sub.below_list_pending, l, sibling)
+ EINA_LIST_FOREACH(parent->comp_data->sub.below_list_pending, l, sibling)
{
if ((sibling != ec1) && (sibling == ec2))
return EINA_TRUE;
{
E_Client *ec, *ecs;
E_Client *parent;
- E_Comp_Wl_Client_Data *cdata = NULL;
- E_Comp_Wl_Client_Data *ecs_cdata = NULL;
- E_Comp_Wl_Client_Data *parent_cdata = NULL;
DBG("Subsurface Cb Place Above: %d", wl_resource_get_id(resource));
ec = wl_resource_get_user_data(resource);
- if (!ec) return;
- if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- if (!(parent = cdata->sub.data->parent)) return;
- if (e_object_is_del(E_OBJECT(parent))) return;
- parent_cdata = e_client_cdata_get(parent);
- if (!parent_cdata) return;
+
+ if (e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) return;
+ if (!ec->comp_data->sub.data) return;
+
+ if (!(parent = ec->comp_data->sub.data->parent)) return;
+ if (e_object_is_del(E_OBJECT(parent)) || !parent->comp_data) return;
/* try to get the client from the sibling resource */
if (!(ecs = wl_resource_get_user_data(sibling_resource))) return;
- ecs_cdata = e_client_cdata_get(ecs);
- if (!ecs_cdata) return;
if (!_subsurface_sibling_check(ec, ecs))
{
- wl_resource_post_error(ecs_cdata->sub.data->resource,
+ wl_resource_post_error(ec->comp_data->sub.data->resource,
WL_SUBSURFACE_ERROR_BAD_SURFACE,
"%s: wl_surface@%d is not a parent or sibling",
- "place_above", wl_resource_get_id(ecs_cdata->surface));
+ "place_above", wl_resource_get_id(ecs->comp_data->surface));
return;
}
- if (!ecs_cdata->sub.data) return;
+ if (!ecs->comp_data->sub.data) return;
- parent_cdata->sub.list_pending =
- eina_list_remove(parent_cdata->sub.list_pending, ec);
+ parent->comp_data->sub.list_pending =
+ eina_list_remove(parent->comp_data->sub.list_pending, ec);
- parent_cdata->sub.list_pending =
- eina_list_append_relative(parent_cdata->sub.list_pending, ec, ecs);
+ parent->comp_data->sub.list_pending =
+ eina_list_append_relative(parent->comp_data->sub.list_pending, ec, ecs);
- parent_cdata->sub.list_changed = EINA_TRUE;
+ parent->comp_data->sub.list_changed = EINA_TRUE;
}
static void
{
E_Client *ec, *ecs;
E_Client *parent;
- E_Comp_Wl_Client_Data *cdata = NULL;
- E_Comp_Wl_Client_Data *ecs_cdata = NULL;
- E_Comp_Wl_Client_Data *parent_cdata = NULL;
DBG("Subsurface Cb Place Below: %d", wl_resource_get_id(resource));
ec = wl_resource_get_user_data(resource);
- if (!ec) return;
- if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- if (!cdata->sub.data) return;
- if (!(parent = cdata->sub.data->parent)) return;
- if (e_object_is_del(E_OBJECT(parent))) return;
- parent_cdata = e_client_cdata_get(parent);
- if (!parent_cdata) return;
+ if (e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) return;
+ if (!ec->comp_data->sub.data) return;
+
+ if (!(parent = ec->comp_data->sub.data->parent)) return;
+ if (e_object_is_del(E_OBJECT(parent)) || !parent->comp_data) return;
/* try to get the client from the sibling resource */
if (!(ecs = wl_resource_get_user_data(sibling_resource))) return;
- ecs_cdata = e_client_cdata_get(ecs);
- if (!ecs_cdata) return;
- if (!ecs_cdata->sub.data) return;
-
if (!_subsurface_sibling_check(ec, ecs))
{
- wl_resource_post_error(ecs_cdata->sub.data->resource,
+ wl_resource_post_error(ec->comp_data->sub.data->resource,
WL_SUBSURFACE_ERROR_BAD_SURFACE,
"%s: wl_surface@%d is not a parent or sibling",
- "place_below", wl_resource_get_id(ecs_cdata->surface));
+ "place_below", wl_resource_get_id(ecs->comp_data->surface));
return;
}
- if (!ecs_cdata->sub.data) return;
+ if (!ecs->comp_data->sub.data) return;
- parent_cdata->sub.list_pending =
- eina_list_remove(parent_cdata->sub.list_pending, ec);
+ parent->comp_data->sub.list_pending =
+ eina_list_remove(parent->comp_data->sub.list_pending, ec);
- parent_cdata->sub.list_pending =
- eina_list_prepend_relative(parent_cdata->sub.list_pending, ec, ecs);
+ parent->comp_data->sub.list_pending =
+ eina_list_prepend_relative(parent->comp_data->sub.list_pending, ec, ecs);
- parent_cdata->sub.list_changed = EINA_TRUE;
+ parent->comp_data->sub.list_changed = EINA_TRUE;
}
static void
_e_comp_wl_subsurface_cb_sync_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Comp_Wl_Subsurf_Data *sdata;
DBG("Subsurface Cb Sync Set: %d", wl_resource_get_id(resource));
ec = wl_resource_get_user_data(resource);
- if (!ec) return;
- if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+
+ if (e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) return;
sdata = _e_comp_wl_subsurface_data_get(ec);
EINA_SAFETY_ON_NULL_RETURN(sdata);
_e_comp_wl_subsurface_cb_desync_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Comp_Wl_Subsurf_Data *sdata;
DBG("Subsurface Cb Desync Set: %d", wl_resource_get_id(resource));
ec = wl_resource_get_user_data(resource);
- if (!ec) return;
- if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+
+ if (e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) return;
sdata = _e_comp_wl_subsurface_data_get(ec);
EINA_SAFETY_ON_NULL_RETURN(sdata);
_e_comp_wl_subcompositor_cb_subsurface_get(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t id, struct wl_resource *surface_resource, struct wl_resource *parent_resource)
{
E_Client *ec, *epc = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
static const char where[] = "get_subsurface: wl_subsurface@";
if (!(ec = wl_resource_get_user_data(surface_resource))) return;
if (e_object_is_del(E_OBJECT(ec))) return;
if (e_object_is_del(E_OBJECT(epc))) return;
- cdata = e_client_cdata_get(ec);
/* check if this surface is already a sub-surface */
- if ((cdata) && (cdata->sub.data))
+ if ((ec->comp_data) && (ec->comp_data->sub.data))
{
wl_resource_post_error(resource,
WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE,
_e_comp_wl_surface_sub_list_free(Eina_List *sub_list)
{
E_Client *subc;
- E_Comp_Wl_Client_Data *subc_cdata = NULL;
EINA_LIST_FREE(sub_list, subc)
{
- subc_cdata = e_client_cdata_get(subc);
- if (!subc_cdata || !subc_cdata->sub.data) continue;
+ if (!subc->comp_data || !subc->comp_data->sub.data) continue;
- subc_cdata->sub.data->parent = NULL;
+ subc->comp_data->sub.data->parent = NULL;
- if (subc_cdata->sub.watcher)
- tizen_subsurface_watcher_send_message(subc_cdata->sub.watcher, TIZEN_SUBSURFACE_WATCHER_MSG_PARENT_ID_DESTROYED);
+ if (subc->comp_data->sub.watcher)
+ tizen_subsurface_watcher_send_message(subc->comp_data->sub.watcher, TIZEN_SUBSURFACE_WATCHER_MSG_PARENT_ID_DESTROYED);
}
}
static void
_e_comp_wl_subsurface_cb_ec_del(void *data EINA_UNUSED, E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
-
- if (!ec) return;
-
/* make sure this is a wayland client */
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ if (!ec->comp_data)
+ return;
- if (cdata->sub.data)
+ if (ec->comp_data->sub.data)
{
- if (cdata->sub.data->parent)
- _e_comp_wl_subsurface_remove_from_parent(cdata->sub.data->parent, ec);
- _e_comp_wl_subsurface_data_destroy(cdata->sub.data);
- cdata->sub.data = NULL;
+ if (ec->comp_data->sub.data->parent)
+ _e_comp_wl_subsurface_remove_from_parent(ec->comp_data->sub.data->parent, ec);
+ _e_comp_wl_subsurface_data_destroy(ec->comp_data->sub.data);
+ ec->comp_data->sub.data = NULL;
}
- if (cdata->sub.below_obj)
+ if (ec->comp_data->sub.below_obj)
{
ELOGF("COMP", "ec deleted", ec);
_e_comp_wl_subsurface_below_obj_destroy(ec);
/* remove sub list */
/* TODO: if parent is set by onscreen_parent of remote surface? */
- _e_comp_wl_surface_sub_list_free(cdata->sub.list);
- cdata->sub.list = NULL;
- _e_comp_wl_surface_sub_list_free(cdata->sub.list_pending);
- cdata->sub.list_pending = NULL;
- _e_comp_wl_surface_sub_list_free(cdata->sub.below_list);
- cdata->sub.below_list = NULL;
- _e_comp_wl_surface_sub_list_free(cdata->sub.below_list_pending);
- cdata->sub.below_list_pending = NULL;
-
+ _e_comp_wl_surface_sub_list_free(ec->comp_data->sub.list);
+ ec->comp_data->sub.list = NULL;
+ _e_comp_wl_surface_sub_list_free(ec->comp_data->sub.list_pending);
+ ec->comp_data->sub.list_pending = NULL;
+ _e_comp_wl_surface_sub_list_free(ec->comp_data->sub.below_list);
+ ec->comp_data->sub.below_list = NULL;
+ _e_comp_wl_surface_sub_list_free(ec->comp_data->sub.below_list_pending);
+ ec->comp_data->sub.below_list_pending = NULL;
evas_object_event_callback_del(ec->frame,
EVAS_CALLBACK_RESTACK,
_e_comp_wl_subsurface_destroy(struct wl_resource *resource)
{
E_Client *ec = wl_resource_get_user_data(resource);
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!e_object_unref(E_OBJECT(ec))) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- if (cdata->sub.data)
+ if ((ec->comp_data) && (ec->comp_data->sub.data))
{
- if (cdata->sub.data->parent)
- _e_comp_wl_subsurface_remove_from_parent(cdata->sub.data->parent, ec);
- _e_comp_wl_subsurface_data_destroy(cdata->sub.data);
- cdata->sub.data = NULL;
+ if (ec->comp_data->sub.data->parent)
+ _e_comp_wl_subsurface_remove_from_parent(ec->comp_data->sub.data->parent, ec);
+ _e_comp_wl_subsurface_data_destroy(ec->comp_data->sub.data);
+ ec->comp_data->sub.data = NULL;
}
}
if (sdata->synchronized) return EINA_TRUE;
if (!sdata->parent) return EINA_FALSE;
+ if (!sdata->parent->comp_data) return EINA_FALSE;
if (e_object_is_del(E_OBJECT(sdata->parent))) return EINA_FALSE;
- if (!e_client_cdata_get(sdata->parent)) return EINA_FALSE;
sdata = _e_comp_wl_subsurface_data_get(sdata->parent);
}
static Eina_Bool
_e_comp_wl_subsurface_circular_reference_check(E_Client *ec, E_Client *parent)
{
- E_Comp_Wl_Client_Data *parent_cdata = NULL;
-
while(parent)
{
if (ec == parent)
return EINA_TRUE;
- parent_cdata = e_client_cdata_get(parent);
- if (parent_cdata && parent_cdata->sub.data)
- parent = parent_cdata->sub.data->parent;
+ if ((parent->comp_data) && (parent->comp_data->sub.data))
+ parent = parent->comp_data->sub.data->parent;
else
break;
}
struct wl_resource *res;
E_Comp_Wl_Subsurf_Data *sdata;
E_Client *offscreen_parent = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
- E_Comp_Wl_Client_Data *epc_cdata = NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(surface_resource, EINA_FALSE);
return EINA_FALSE;
}
- if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return EINA_FALSE;
+ if (e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) return EINA_FALSE;
res = wl_resource_create(client, &wl_subsurface_interface, 1, id);
if (!res)
return EINA_FALSE;
}
- epc_cdata = e_client_cdata_get(epc);
-
// reparent remote surface provider's subsurfaces
- if (epc_cdata && epc_cdata->remote_surface.onscreen_parent)
+ if ((epc->comp_data) && (epc->comp_data->remote_surface.onscreen_parent))
{
offscreen_parent = epc;
- epc = epc_cdata->remote_surface.onscreen_parent;
+ epc = epc->comp_data->remote_surface.onscreen_parent;
}
// check parent relationship is a cycle
/* TODO: add callbacks ?? */
- cdata->surface = surface_resource;
- cdata->sub.data = sdata;
+ ec->comp_data->surface = surface_resource;
+ ec->comp_data->sub.data = sdata;
ec->lock_user_location = 0;
ec->lock_client_location = 0;
/* Delete 'below_obj' if it was created before 'E_Client' becomes subsurface.
* It's not for subsurface. */
- E_FREE_FUNC(cdata->sub.below_obj, evas_object_del);
+ E_FREE_FUNC(ec->comp_data->sub.below_obj, evas_object_del);
/* Delete a listener for restack of evas.
* There is no need to watch restack of evas for sub-surface because
EINTERN Eina_Bool
e_comp_wl_subsurface_commit(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Comp_Wl_Subsurf_Data *sdata;
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
- if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return EINA_FALSE;
+
+ /* check for valid subcompositor data */
+ if (e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) return EINA_FALSE;
sdata = _e_comp_wl_subsurface_data_get(ec);
if (!sdata) return EINA_FALSE;
else
e_comp_wl_surface_commit(ec);
- EINA_LIST_FOREACH(cdata->sub.list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc)
{
if (ec != subc)
_e_comp_wl_subsurface_parent_commit(subc, EINA_FALSE);
}
- EINA_LIST_FOREACH(cdata->sub.below_list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.below_list, l, subc)
{
if (ec != subc)
_e_comp_wl_subsurface_parent_commit(subc, EINA_FALSE);
e_comp_wl_normal_subsurface_has(E_Client *ec)
{
E_Client *subc;
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_List *l;
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return EINA_FALSE;
+ if (!ec->comp_data) return EINA_FALSE;
/* if a leaf client is not video cliet */
- if (cdata->sub.data && !cdata->sub.below_list &&
- !cdata->sub.below_list_pending &&
- ((!cdata->video_client) && (!e_client_video_hw_composition_check(ec))))
+ if (ec->comp_data->sub.data && !ec->comp_data->sub.below_list &&
+ !ec->comp_data->sub.below_list_pending &&
+ ((!ec->comp_data->video_client) && (!e_client_video_hw_composition_check(ec))))
return EINA_TRUE;
- EINA_LIST_FOREACH(cdata->sub.below_list_pending, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.below_list_pending, l, subc)
if (e_comp_wl_normal_subsurface_has(subc))
return EINA_TRUE;
- EINA_LIST_FOREACH(cdata->sub.below_list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.below_list, l, subc)
if (e_comp_wl_normal_subsurface_has(subc))
return EINA_TRUE;
e_comp_wl_subsurface_check_below_bg_rectangle(E_Client *ec)
{
EINA_SAFETY_ON_NULL_RETURN(ec);
- if (e_object_is_del(E_OBJECT(ec))) return;
- if (!e_client_cdata_get(ec)) return;
+
+ if ((e_object_is_del(E_OBJECT(ec))) || (!ec->comp_data))
+ return;
_e_comp_wl_subsurface_check_below_bg_rectangle(ec);
}
static void
_e_comp_wl_subsurface_invalid_parent_handle(E_Client *ec, struct wl_resource *resource)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- if (cdata->sub.watcher)
- tizen_subsurface_watcher_send_message(cdata->sub.watcher, TIZEN_SUBSURFACE_WATCHER_MSG_PARENT_ID_INVALID);
+ if (ec->comp_data->sub.watcher)
+ tizen_subsurface_watcher_send_message(ec->comp_data->sub.watcher, TIZEN_SUBSURFACE_WATCHER_MSG_PARENT_ID_INVALID);
/* We have to create a subsurface resource here even though it's error case
* because server will send the fatal error when a client destroy a subsurface object.
static void
_e_comp_wl_subsurface_remove_from_parent(E_Client *parent, E_Client *subc)
{
- E_Comp_Wl_Client_Data *parent_cdata = e_client_cdata_get(parent);
-
- parent_cdata->sub.list =
- eina_list_remove(parent_cdata->sub.list, subc);
- parent_cdata->sub.list_pending =
- eina_list_remove(parent_cdata->sub.list_pending, subc);
- parent_cdata->sub.below_list =
- eina_list_remove(parent_cdata->sub.below_list, subc);
- parent_cdata->sub.below_list_pending =
- eina_list_remove(parent_cdata->sub.below_list_pending, subc);
+ parent->comp_data->sub.list =
+ eina_list_remove(parent->comp_data->sub.list, subc);
+ parent->comp_data->sub.list_pending =
+ eina_list_remove(parent->comp_data->sub.list_pending, subc);
+ parent->comp_data->sub.below_list =
+ eina_list_remove(parent->comp_data->sub.below_list, subc);
+ parent->comp_data->sub.below_list_pending =
+ eina_list_remove(parent->comp_data->sub.below_list_pending, subc);
if ((!_e_comp_wl_subsurface_data_get(parent)) &&
(_e_comp_wl_subsurface_empty_check(parent)))
EVAS_CALLBACK_RESTACK,
_e_comp_wl_subsurface_cb_evas_restack);
}
+
+
}
static E_Comp_Wl_Subsurf_Data *
_e_comp_wl_subsurface_data_get(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- return (cdata) ? (cdata->sub.data) : NULL;
+ return (ec->comp_data) ? (ec->comp_data->sub.data) : NULL;
}
static void
_e_comp_wl_subsurface_stack_update(E_Client *ec)
{
E_Client *topmost;
- E_Comp_Wl_Client_Data *cdata = NULL;
+ if (!ec->comp_data) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- if (cdata->sub.restacking) return;
+ if (ec->comp_data->sub.restacking) return;
/* return if ec isn't both a parent of a subsurface and a subsurface itself */
- if (!cdata->sub.list && !cdata->sub.below_list && !cdata->sub.data)
+ if (!ec->comp_data->sub.list && !ec->comp_data->sub.below_list && !ec->comp_data->sub.data)
{
- if (cdata->sub.below_obj)
+ if (ec->comp_data->sub.below_obj)
_e_comp_wl_subsurface_restack_bg_rectangle(ec);
return;
}
_e_comp_wl_subsurface_restack_bg_rectangle(topmost);
//To update client stack list
- if ((cdata->sub.data) &&
- (cdata->sub.data->parent))
+ if ((ec->comp_data->sub.data) &&
+ (ec->comp_data->sub.data->parent))
{
E_Client *parent;
- E_Comp_Wl_Client_Data *parent_cdata = NULL;
Evas_Object *o;
- parent = cdata->sub.data->parent;
- parent_cdata = e_client_cdata_get(parent);
+ parent = ec->comp_data->sub.data->parent;
- if ((parent_cdata->sub.list) &&
- (eina_list_data_find(parent_cdata->sub.list, ec)))
+ if ((parent->comp_data->sub.list) &&
+ (eina_list_data_find(parent->comp_data->sub.list, ec)))
{
//stack above done
o = evas_object_below_get(ec->frame);
e_comp_object_layer_update(ec->frame, o, NULL);
}
- else if ((parent_cdata->sub.below_list) &&
- (eina_list_data_find(parent_cdata->sub.below_list, ec)))
+ else if ((parent->comp_data->sub.below_list) &&
+ (eina_list_data_find(parent->comp_data->sub.below_list, ec)))
{
//stack below done
o = evas_object_above_get(ec->frame);
_e_comp_wl_subsurface_cb_evas_restack(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
E_Client *topmost;
- E_Comp_Wl_Client_Data *topmost_cdata;
/* Given data must be a topmost E_Client of subsurfaces. */
topmost = data;
- topmost_cdata = e_client_cdata_get(topmost);
- if (topmost_cdata->sub.restacking)
+ if (topmost->comp_data->sub.restacking)
{
ELOGF("SUB-COMP", "A topmost parent is getting restacked", topmost);
return;
static Eina_Bool
_e_comp_wl_subsurface_empty_check(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
-
- return (!cdata) ||
- ((eina_list_count(cdata->sub.list) == 0) &&
- (eina_list_count(cdata->sub.list_pending) == 0) &&
- (eina_list_count(cdata->sub.below_list) == 0) &&
- (eina_list_count(cdata->sub.below_list_pending) == 0));
+ return (!ec->comp_data) ||
+ ((eina_list_count(ec->comp_data->sub.list) == 0) &&
+ (eina_list_count(ec->comp_data->sub.list_pending) == 0) &&
+ (eina_list_count(ec->comp_data->sub.below_list) == 0) &&
+ (eina_list_count(ec->comp_data->sub.below_list_pending) == 0));
}
static void
_e_comp_wl_subsurface_parent_link(E_Comp_Wl_Subsurf_Data *sdata, E_Client *subc, E_Client *epc)
{
E_Layer layer;
- E_Comp_Wl_Client_Data *epc_cdata = e_client_cdata_get(epc);
sdata->parent = epc;
}
}
- if (epc_cdata)
+ if (epc->comp_data)
{
/* append this client to the parents subsurface list */
- epc_cdata->sub.list_pending =
- eina_list_append(epc_cdata->sub.list_pending, subc);
- epc_cdata->sub.list_changed = EINA_TRUE;
+ epc->comp_data->sub.list_pending =
+ eina_list_append(epc->comp_data->sub.list_pending, subc);
+ epc->comp_data->sub.list_changed = EINA_TRUE;
}
}
_topmost_parent_get(E_Client *ec)
{
E_Client *parent = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
- E_Comp_Wl_Client_Data *parent_cdata = NULL;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->sub.data)
+ if (!ec->comp_data || !ec->comp_data->sub.data)
return ec;
- parent = cdata->sub.data->parent;
+ parent = ec->comp_data->sub.data->parent;
while (parent)
{
- parent_cdata = e_client_cdata_get(parent);
- if (!parent_cdata || !parent_cdata->sub.data)
+ if (!parent->comp_data || !parent->comp_data->sub.data)
return parent;
- parent = parent_cdata->sub.data->parent;
+ parent = parent->comp_data->sub.data->parent;
}
return ec;
_destroy_viewport(E_Viewport *viewport)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!viewport) return;
if (viewport->dst_mode_res)
wl_resource_set_user_data(viewport->dst_mode_res, NULL);
- cdata = e_client_cdata_get(ec);
- if (cdata && cdata->scaler.viewport)
+ if (ec->comp_data && ec->comp_data->scaler.viewport)
{
- cdata->scaler.viewport = NULL;
- cdata->scaler.buffer_viewport.buffer.src_width = wl_fixed_from_int(-1);
- cdata->scaler.buffer_viewport.surface.width = -1;
- cdata->scaler.buffer_viewport.changed = 1;
- cdata->pending.buffer_viewport.buffer.src_width = wl_fixed_from_int(-1);
- cdata->pending.buffer_viewport.surface.width = -1;
- cdata->pending.buffer_viewport.changed = 1;
+ ec->comp_data->scaler.viewport = NULL;
+ ec->comp_data->scaler.buffer_viewport.buffer.src_width = wl_fixed_from_int(-1);
+ ec->comp_data->scaler.buffer_viewport.surface.width = -1;
+ ec->comp_data->scaler.buffer_viewport.changed = 1;
+ ec->comp_data->pending.buffer_viewport.buffer.src_width = wl_fixed_from_int(-1);
+ ec->comp_data->pending.buffer_viewport.surface.width = -1;
+ ec->comp_data->pending.buffer_viewport.changed = 1;
}
PIN("tizen_viewport@%d destroy. viewport(%p)", wl_resource_get_id(viewport->resource), viewport);
{
E_Client *ec = viewport->ec;
E_Client *new_parent;
- E_Comp_Wl_Client_Data *cdata = NULL;
- if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ if (e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) return;
- new_parent = (cdata->sub.data) ? cdata->sub.data->parent : NULL;
+ new_parent = (ec->comp_data->sub.data) ? ec->comp_data->sub.data->parent : NULL;
if (viewport->epc == new_parent) return;
{
E_Client *ec;
E_Client *subc;
- E_Comp_Wl_Client_Data *cdata = NULL;
- E_Comp_Wl_Client_Data *subc_cdata = NULL;
Eina_List *l;
E_Viewport *sub_viewport;
viewport->current.changed = EINA_TRUE;
ec = viewport->ec;
- cdata = e_client_cdata_get(ec);
- EINA_LIST_FOREACH(cdata->sub.list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc)
{
- if (!subc) continue;
- if (e_object_is_del(E_OBJECT(subc))) continue;
- subc_cdata = e_client_cdata_get(subc);
- if (!subc_cdata) continue;
+ if (!subc || !subc->comp_data || e_object_is_del(E_OBJECT(subc)))
+ continue;
- sub_viewport = _e_comp_wl_viewport_get_viewport(subc_cdata->scaler.viewport);
+ sub_viewport = _e_comp_wl_viewport_get_viewport(subc->comp_data->scaler.viewport);
_e_comp_wl_viewport_set_changed(sub_viewport);
}
- EINA_LIST_FOREACH(cdata->sub.below_list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.below_list, l, subc)
{
- if (!subc) continue;
- if (e_object_is_del(E_OBJECT(subc))) continue;
- subc_cdata = e_client_cdata_get(subc);
- if (!subc_cdata) continue;
+ if (!subc || !subc->comp_data || e_object_is_del(E_OBJECT(subc)))
+ continue;
- sub_viewport = _e_comp_wl_viewport_get_viewport(subc_cdata->scaler.viewport);
+ sub_viewport = _e_comp_wl_viewport_get_viewport(subc->comp_data->scaler.viewport);
_e_comp_wl_viewport_set_changed(sub_viewport);
}
}
{
E_Client *epc = viewport->epc;
E_Client *topmost;
- E_Comp_Wl_Client_Data *epc_cdata = NULL;
unsigned int ptran, pflip;
int ptransform;
- if (!epc) return 0;
- if (e_object_is_del(E_OBJECT(epc))) return 0;
- epc_cdata = e_client_cdata_get(epc);
- if (!epc_cdata) return 0;
+ if (!epc->comp_data || e_object_is_del(E_OBJECT(epc)))
+ return 0;
ptransform = e_comp_wl_output_buffer_transform_get(epc);
{
int ptransform;
- if (e_object_is_del(E_OBJECT(epc)))
- return EINA_FALSE;
- if (!e_client_cdata_get(epc))
+ if (!epc->comp_data || e_object_is_del(E_OBJECT(epc)))
return EINA_FALSE;
ptransform = e_comp_wl_output_buffer_transform_get(epc);
_e_comp_wl_viewport_apply_transform(E_Viewport *viewport, int *rtransform)
{
E_Client *ec = viewport->ec;
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- E_Comp_Wl_Buffer_Viewport *vp = &cdata->scaler.buffer_viewport;
+ E_Comp_Wl_Buffer_Viewport *vp = &ec->comp_data->scaler.buffer_viewport;
Eina_Bool changed = EINA_FALSE;
unsigned int new_transform;
unsigned int pwtran, ptran, pflip, ctran, cflip;
int ptransform;
- if (!e_client_cdata_get(epc) || e_object_is_del(E_OBJECT(epc)))
+ if (!epc->comp_data || e_object_is_del(E_OBJECT(epc)))
{
*rtransform = vp->buffer.transform;
return EINA_FALSE;
vp->buffer.transform = new_transform;
vp->changed = changed = EINA_TRUE;
- cdata->pending.buffer_viewport = *vp;
- if (cdata->sub.data)
- cdata->sub.data->cached.buffer_viewport = *vp;
+ ec->comp_data->pending.buffer_viewport = *vp;
+ if (ec->comp_data->sub.data)
+ ec->comp_data->sub.data->cached.buffer_viewport = *vp;
}
if (changed)
_e_comp_wl_viewport_apply_destination(E_Viewport *viewport, Eina_Rectangle *rrect)
{
E_Client *ec = viewport->ec;
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
E_Comp_Wl_Buffer_Viewport *vp;
Eina_Rectangle dst = {0,}, prect;
Eina_Bool changed = EINA_FALSE;
- vp = &cdata->scaler.buffer_viewport;
+ vp = &ec->comp_data->scaler.buffer_viewport;
if (!viewport->epc)
{
E_Zone *zone = e_comp_zone_xy_get(ec->x, ec->y);
else
{
E_Client *epc = viewport->epc;
- E_Comp_Wl_Client_Data *epc_cdata = e_client_cdata_get(epc);
E_Comp_Wl_Buffer_Viewport *vpp;
- if (!epc_cdata || e_object_is_del(E_OBJECT(epc)))
+ if (!epc->comp_data || e_object_is_del(E_OBJECT(epc)))
return EINA_FALSE;
- vpp = &epc_cdata->scaler.buffer_viewport;
+ vpp = &epc->comp_data->scaler.buffer_viewport;
prect.x = prect.y = 0;
if (vpp->surface.width != -1)
{
_e_comp_wl_viewport_crop_by_parent(viewport, &prect, &dst);
/* The values of below x, y, w, h are specified in the transform 0 and in the parent */
- if (cdata->sub.data)
+ if (ec->comp_data->sub.data)
{
- if (cdata->sub.data->position.x != dst.x ||
- cdata->sub.data->position.y != dst.y)
+ if (ec->comp_data->sub.data->position.x != dst.x ||
+ ec->comp_data->sub.data->position.y != dst.y)
{
- cdata->sub.data->position.x = dst.x;
- cdata->sub.data->position.y = dst.y;
- cdata->sub.data->position.set = EINA_TRUE;
+ ec->comp_data->sub.data->position.x = dst.x;
+ ec->comp_data->sub.data->position.y = dst.y;
+ ec->comp_data->sub.data->position.set = EINA_TRUE;
vp->changed = changed = EINA_TRUE;
}
}
vp->surface.height = dst.h;
vp->changed = changed = EINA_TRUE;
- cdata->pending.buffer_viewport = *vp;
- if (cdata->sub.data)
- cdata->sub.data->cached.buffer_viewport = *vp;
+ ec->comp_data->pending.buffer_viewport = *vp;
+ if (ec->comp_data->sub.data)
+ ec->comp_data->sub.data->cached.buffer_viewport = *vp;
}
*rrect = dst;
_e_comp_wl_viewport_apply_source(E_Viewport *viewport)
{
E_Client *ec = viewport->ec;
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- E_Comp_Wl_Buffer_Viewport *vp = &cdata->scaler.buffer_viewport;
+ E_Comp_Wl_Buffer_Viewport *vp = &ec->comp_data->scaler.buffer_viewport;
Eina_Rectangle rect = {0,};
int bw = 0, bh = 0;
wl_fixed_t fx, fy, fw, fh;
vp->buffer.src_height = wl_fixed_from_int(rect.h);
vp->changed = changed = EINA_TRUE;
- cdata->pending.buffer_viewport = *vp;
- if (cdata->sub.data)
- cdata->sub.data->cached.buffer_viewport = *vp;
+ ec->comp_data->pending.buffer_viewport = *vp;
+ if (ec->comp_data->sub.data)
+ ec->comp_data->sub.data->cached.buffer_viewport = *vp;
}
if (changed)
{
E_Viewport *viewport;
E_Client *subc;
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_List *l;
- if (!ec) return EINA_FALSE;
- if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return EINA_FALSE;
+ if (!ec || !ec->comp_data || e_object_is_del(E_OBJECT(ec)))
+ return EINA_FALSE;
- viewport = _e_comp_wl_viewport_get_viewport(cdata->scaler.viewport);
+ viewport = _e_comp_wl_viewport_get_viewport(ec->comp_data->scaler.viewport);
if (viewport)
_e_comp_wl_viewport_parent_check(viewport);
- if (viewport && cdata->buffer_ref.buffer)
+ if (viewport && ec->comp_data->buffer_ref.buffer)
{
- E_Comp_Wl_Buffer_Viewport *vp = &cdata->scaler.buffer_viewport;
+ E_Comp_Wl_Buffer_Viewport *vp = &ec->comp_data->scaler.buffer_viewport;
Eina_Bool changed = EINA_FALSE, src_changed = EINA_FALSE;
Eina_Rectangle rrect = {0,};
int rtransform = 0;
}
}
else if (viewport)
- PDB("%p buffer", cdata->buffer_ref.buffer);
+ PDB("%p buffer", ec->comp_data->buffer_ref.buffer);
- EINA_LIST_FOREACH(cdata->sub.list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc)
e_comp_wl_viewport_apply(subc);
- EINA_LIST_FOREACH(cdata->sub.below_list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.below_list, l, subc)
e_comp_wl_viewport_apply(subc);
return EINA_TRUE;
{
E_Viewport *viewport;
E_Client *subc;
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_List *l;
- if (!ec) return EINA_FALSE;
- if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return EINA_FALSE;
+ if (!ec || !ec->comp_data || e_object_is_del(E_OBJECT(ec)))
+ return EINA_FALSE;
- viewport = _e_comp_wl_viewport_get_viewport(cdata->scaler.viewport);
+ viewport = _e_comp_wl_viewport_get_viewport(ec->comp_data->scaler.viewport);
if(viewport && viewport->current.changed)
return EINA_TRUE;
- EINA_LIST_FOREACH(cdata->sub.list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc)
if (e_comp_wl_viewport_is_changed(subc))
return EINA_TRUE;
- EINA_LIST_FOREACH(cdata->sub.below_list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.below_list, l, subc)
if (e_comp_wl_viewport_is_changed(subc))
return EINA_TRUE;
E_Viewport *viewport = container_of(listener, E_Viewport, surface_apply_viewport_listener);
E_Client *ec = viewport->ec;
E_Client *topmost = _topmost_parent_get(ec);
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- E_Comp_Wl_Client_Data *epc_cdata = NULL;
- E_Comp_Wl_Buffer_Viewport *vp = &cdata->scaler.buffer_viewport;
+ E_Comp_Wl_Buffer_Viewport *vp = &ec->comp_data->scaler.buffer_viewport;
Eina_Bool changed = EINA_FALSE;
if (vp->changed)
_e_comp_wl_viewport_parent_check(viewport);
if (!viewport->current.changed) return;
- if (!cdata->buffer_ref.buffer) return;
- if (viewport->epc)
- {
- epc_cdata = e_client_cdata_get(viewport->epc);
- if (!epc_cdata) return;
- }
+ if (!ec->comp_data->buffer_ref.buffer) return;
+ if (viewport->epc && !viewport->epc->comp_data->buffer_ref.buffer) return;
PDB("apply: topmost(%p)", topmost);
struct wl_resource *surface)
{
E_Client *ec = wl_resource_get_user_data(surface);
- E_Comp_Wl_Client_Data *cdata = NULL;
int version = wl_resource_get_version(resource);
struct wl_client *client;
struct wl_resource *res;
E_Viewport *viewport;
- if (!ec || e_object_is_del(E_OBJECT(ec)))
+ if (!ec || !ec->comp_data || e_object_is_del(E_OBJECT(ec)) || !ec->comp_data->surface)
{
ERR("wrong resource %d", wl_resource_get_id(surface));
return EINA_FALSE;
}
- cdata = e_client_cdata_get(ec);
- if (!cdata)
- {
- ERR("no cdata");
- return EINA_FALSE;
- }
-
- if (!cdata->surface)
- {
- ERR("wrong resource %d.(cdata->surface)", wl_resource_get_id(surface));
- return EINA_FALSE;
- }
-
- if (cdata->scaler.viewport)
+ if (ec->comp_data->scaler.viewport)
{
ERR("wl_surface@%d already has a viewport",
wl_resource_get_id(surface));
viewport->cropped_source.w = -1;
viewport->surface_apply_viewport_listener.notify = _e_comp_wl_viewport_cb_apply_viewport;
- wl_signal_add(&cdata->apply_viewport_signal, &viewport->surface_apply_viewport_listener);
+ wl_signal_add(&ec->comp_data->apply_viewport_signal, &viewport->surface_apply_viewport_listener);
/* Use scaler variable because tizen_viewport is the alternative of wl_viewport */
- cdata->scaler.viewport = res;
+ ec->comp_data->scaler.viewport = res;
wl_resource_set_implementation(res, &_e_comp_wl_viewport_interface,
viewport, _e_comp_wl_viewport_destroy);
viewport->surface_destroy_listener.notify = _e_comp_wl_viewport_cb_surface_destroy;
- wl_resource_add_destroy_listener(cdata->surface, &viewport->surface_destroy_listener);
+ wl_resource_add_destroy_listener(ec->comp_data->surface, &viewport->surface_destroy_listener);
PIN("tizen_viewport@%d viewport(%p) created", id, viewport);
for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Viewport *viewport;
Ecore_Window win = 0;
const char *name = NULL;
ec = evas_object_data_get(o, "E_Client");
- if (!ec || e_object_is_del(E_OBJECT(ec))) continue;
- cdata = e_client_cdata_get(ec);
- if (!cdata) continue;
+ if (!ec || e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) continue;
- viewport = _e_comp_wl_viewport_get_viewport(cdata->scaler.viewport);
+ viewport = _e_comp_wl_viewport_get_viewport(ec->comp_data->scaler.viewport);
if (!viewport) continue;
if (first_line)
_e_viewport_destroy(struct wl_resource *resource)
{
E_Client *ec = wl_resource_get_user_data(resource);
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!e_object_unref(E_OBJECT(ec))) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- if (!cdata->scaler.viewport) return;
-
- cdata->scaler.viewport = NULL;
- cdata->pending.buffer_viewport.buffer.src_width = wl_fixed_from_int(-1);
- cdata->pending.buffer_viewport.surface.width = -1;
- cdata->pending.buffer_viewport.changed = 1;
+ if (!ec->comp_data) return;
+ if (!ec->comp_data->scaler.viewport) return;
+
+ ec->comp_data->scaler.viewport = NULL;
+ ec->comp_data->pending.buffer_viewport.buffer.src_width = wl_fixed_from_int(-1);
+ ec->comp_data->pending.buffer_viewport.surface.width = -1;
+ ec->comp_data->pending.buffer_viewport.changed = 1;
}
static void
int32_t dst_height)
{
E_Client *ec = wl_resource_get_user_data(resource);
- E_Comp_Wl_Client_Data *cdata = NULL;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN(cdata);
- EINA_SAFETY_ON_NULL_RETURN(cdata->scaler.viewport);
+ EINA_SAFETY_ON_NULL_RETURN(ec->comp_data);
+ EINA_SAFETY_ON_NULL_RETURN(ec->comp_data->scaler.viewport);
if (wl_fixed_to_double(src_width) < 0 || wl_fixed_to_double(src_height) < 0)
{
return;
}
- cdata->pending.buffer_viewport.buffer.src_x = src_x;
- cdata->pending.buffer_viewport.buffer.src_y = src_y;
- cdata->pending.buffer_viewport.buffer.src_width = src_width;
- cdata->pending.buffer_viewport.buffer.src_height = src_height;
- cdata->pending.buffer_viewport.surface.width = dst_width;
- cdata->pending.buffer_viewport.surface.height = dst_height;
- cdata->pending.buffer_viewport.changed = 1;
+ ec->comp_data->pending.buffer_viewport.buffer.src_x = src_x;
+ ec->comp_data->pending.buffer_viewport.buffer.src_y = src_y;
+ ec->comp_data->pending.buffer_viewport.buffer.src_width = src_width;
+ ec->comp_data->pending.buffer_viewport.buffer.src_height = src_height;
+ ec->comp_data->pending.buffer_viewport.surface.width = dst_width;
+ ec->comp_data->pending.buffer_viewport.surface.height = dst_height;
+ ec->comp_data->pending.buffer_viewport.changed = 1;
}
static void
wl_fixed_t src_height)
{
E_Client *ec = wl_resource_get_user_data(resource);
- E_Comp_Wl_Client_Data *cdata = NULL;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN(cdata);
- EINA_SAFETY_ON_NULL_RETURN(cdata->scaler.viewport);
+ EINA_SAFETY_ON_NULL_RETURN(ec->comp_data);
+ EINA_SAFETY_ON_NULL_RETURN(ec->comp_data->scaler.viewport);
if (src_width == wl_fixed_from_int(-1) && src_height == wl_fixed_from_int(-1))
{
/* unset source size */
- cdata->pending.buffer_viewport.buffer.src_width = wl_fixed_from_int(-1);
- cdata->pending.buffer_viewport.changed = 1;
+ ec->comp_data->pending.buffer_viewport.buffer.src_width = wl_fixed_from_int(-1);
+ ec->comp_data->pending.buffer_viewport.changed = 1;
return;
}
return;
}
- cdata->pending.buffer_viewport.buffer.src_x = src_x;
- cdata->pending.buffer_viewport.buffer.src_y = src_y;
- cdata->pending.buffer_viewport.buffer.src_width = src_width;
- cdata->pending.buffer_viewport.buffer.src_height = src_height;
- cdata->pending.buffer_viewport.changed = 1;
+ ec->comp_data->pending.buffer_viewport.buffer.src_x = src_x;
+ ec->comp_data->pending.buffer_viewport.buffer.src_y = src_y;
+ ec->comp_data->pending.buffer_viewport.buffer.src_width = src_width;
+ ec->comp_data->pending.buffer_viewport.buffer.src_height = src_height;
+ ec->comp_data->pending.buffer_viewport.changed = 1;
}
static void
int32_t dst_height)
{
E_Client *ec = wl_resource_get_user_data(resource);
- E_Comp_Wl_Client_Data *cdata = NULL;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN(cdata);
- EINA_SAFETY_ON_NULL_RETURN(cdata->scaler.viewport);
+ EINA_SAFETY_ON_NULL_RETURN(ec->comp_data);
+ EINA_SAFETY_ON_NULL_RETURN(ec->comp_data->scaler.viewport);
if (dst_width == -1 && dst_height == -1)
{
/* unset destination size */
- cdata->pending.buffer_viewport.surface.width = -1;
- cdata->pending.buffer_viewport.changed = 1;
+ ec->comp_data->pending.buffer_viewport.surface.width = -1;
+ ec->comp_data->pending.buffer_viewport.changed = 1;
return;
}
return;
}
- cdata->pending.buffer_viewport.surface.width = dst_width;
- cdata->pending.buffer_viewport.surface.height = dst_height;
- cdata->pending.buffer_viewport.changed = 1;
+ ec->comp_data->pending.buffer_viewport.surface.width = dst_width;
+ ec->comp_data->pending.buffer_viewport.surface.height = dst_height;
+ ec->comp_data->pending.buffer_viewport.changed = 1;
}
static const struct wl_viewport_interface _e_viewport_interface =
{
int version = wl_resource_get_version(scaler);
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
struct wl_resource *res;
if (!(ec = wl_resource_get_user_data(surface_resource))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ if (!ec->comp_data) return;
- if (cdata && cdata->scaler.viewport)
+ if (ec->comp_data && ec->comp_data->scaler.viewport)
{
wl_resource_post_error(scaler,
WL_SCALER_ERROR_VIEWPORT_EXISTS,
return;
}
- cdata->scaler.viewport = res;
+ ec->comp_data->scaler.viewport = res;
wl_resource_set_implementation(res, &_e_viewport_interface, ec, _e_viewport_destroy);
e_object_ref(E_OBJECT(ec));
}
e_desk_geometry_set(E_Desk *desk, int x, int y, int w, int h)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Maximize max;
Eina_List *l = NULL, *ll = NULL;
Evas_Object *m;
EINA_LIST_FOREACH(sd->clients, l, ec)
{
- cdata = e_client_cdata_get(ec);
/* even if the desktop geometry is chagned, the system partial windows such as virtual
* keyboard and clipboard should be placed at the bottom of the desktop. */
/* QUICK FIX */
{
continue;
}
- else if (cdata && cdata->sub.data)
+ else if ((ec->comp_data) && (ec->comp_data->sub.data))
{
continue;
}
{
E_Desk *desk;
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_List *l;
int cx, cy;
double zoomx, zoomy;
EINA_LIST_FOREACH(sd->clients, l, ec)
{
- cdata = e_client_cdata_get(ec);
if ((ec->visibility.obscured == E_VISIBILITY_UNOBSCURED) ||
- (cdata && cdata->sub.data))
+ (ec->comp_data && ec->comp_data->sub.data))
_e_desk_client_zoom(ec, zoomx, zoomy, cx, cy);
}
void _e_desk_group_ec_geometry_apply(E_Desk_Group *edg, E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Util_Transform *transform;
transform = ec->desk_group.transform;
if (!transform) return;
// skip subsurface
- cdata = e_client_cdata_get(ec);
- if (cdata && cdata->sub.data)
+ if (ec->comp_data && ec->comp_data->sub.data)
return;
e_util_transform_move(transform, edg->x, edg->y, 0);
Eina_List *l, *ll;
wl_fixed_t f_value;
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
ec = e_client_focused_get();
if (!ec) return;
if (e_object_is_del(E_OBJECT(ec))) return;
if (ec->ignored) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->surface) return;
+ if (!ec->comp_data || !ec->comp_data->surface) return;
f_value = wl_fixed_from_double(detent * 1.0);
- wc = wl_resource_get_client(cdata->surface);
+ wc = wl_resource_get_client(ec->comp_data->surface);
EINA_LIST_FOREACH(e_devicemgr->device_list, l, input_dev)
{
{
E_EomOutputPtr eom_output = NULL;
E_Client *parent_ec = NULL, *output_ec = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL, *parent_cdata = NULL;
Eina_List *l;
EINA_LIST_FOREACH(g_eom->eom_outputs, l, eom_output)
if (output_ec == ec) return eom_output;
- cdata = e_client_cdata_get(ec);
- if (!cdata) continue;
- if (!cdata->sub.data) continue;
+ if (!ec->comp_data) continue;
+ if (!ec->comp_data->sub.data) continue;
- parent_ec = cdata->sub.data->parent;
+ parent_ec = ec->comp_data->sub.data->parent;
while (parent_ec)
{
if (parent_ec == output_ec) return eom_output;
- parent_cdata = e_client_cdata_get(parent_ec);
- if (!parent_cdata) break;
- if (!parent_cdata->sub.data) break;
+ if (!parent_ec->comp_data) break;
+ if (!parent_ec->comp_data->sub.data) break;
- parent_ec = parent_cdata->sub.data->parent;
+ parent_ec = parent_ec->comp_data->sub.data->parent;
}
}
static void
_e_eom_output_send_configure_event(E_EomOutput *eom_output, E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
+ E_Comp_Client_Data *cdata = NULL;
E_EomCompObjectInterceptHookData *hook_data = NULL;
E_Comp_Object_Intercept_Hook *hook = NULL;
int w, h;
- cdata = e_client_cdata_get(ec);
+ cdata = ec->comp_data;
EINA_SAFETY_ON_NULL_RETURN(cdata);
EINA_SAFETY_ON_NULL_RETURN(cdata->shell.configure_send);
/* get the output size */
e_output_size_get(eom_output->output, &w, &h);
- cdata->shell.configure_send(cdata->shell.surface, 0, w, h);
+ cdata->shell.configure_send(ec->comp_data->shell.surface, 0, w, h);
EOMINF("Send Configure Event for Presentation (%d X %d)", ec, eom_output->output, w, h);
Eina_List *l;
E_EomClientPtr client;
E_Client *parent = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL, *parent_cdata = NULL;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->sub.data)
+ if (!ec->comp_data || !ec->comp_data->sub.data)
return NULL;
EINA_LIST_FOREACH(g_eom->clients, l, client)
{
- parent = cdata->sub.data->parent;
+ parent = ec->comp_data->sub.data->parent;
while (parent)
{
if (client->ec == parent)
return client;
- parent_cdata = e_client_cdata_get(parent);
- if (!parent_cdata || !parent_cdata->sub.data)
+ if (!parent->comp_data || !parent->comp_data->sub.data)
break;
- parent = parent_cdata->sub.data->parent;
+ parent = parent->comp_data->sub.data->parent;
}
}
static E_Comp_Wl_Buffer *
_e_explicit_sync_comp_wl_buffer_get(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata;
+ E_Comp_Client_Data *cdata;
if (!ec) return NULL;
- cdata = e_client_cdata_get(ec);
+
+ cdata = ec->comp_data;
if (!cdata) return NULL;
return cdata->buffer_ref.buffer;
Eina_List *l;
if (!cp) return EINA_FALSE;
- cdata = e_pixmap_cdata_get(cp);
+ cdata = (E_Comp_Wl_Client_Data*)e_pixmap_cdata_get(cp);
if (!cdata) return EINA_FALSE;
EINA_LIST_FOREACH(cdata->aux_hint.hints, l, hint)
Eina_Bool found = EINA_FALSE;
if (!cp) return EINA_FALSE;
- cdata = e_pixmap_cdata_get(cp);
+ cdata = (E_Comp_Wl_Client_Data*)e_pixmap_cdata_get(cp);
if (!cdata) return EINA_FALSE;
EINA_LIST_FOREACH(cdata->aux_hint.hints, l, hint)
int res = -1;
if (!cp) return EINA_FALSE;
- cdata = e_pixmap_cdata_get(cp);
+ cdata = (E_Comp_Wl_Client_Data*)e_pixmap_cdata_get(cp);
if (!cdata) return EINA_FALSE;
EINA_LIST_FOREACH_SAFE(cdata->aux_hint.hints, l, ll, hint)
const char *res = NULL;
if (!cp) return NULL;
- cdata = e_pixmap_cdata_get(cp);
+ cdata = (E_Comp_Wl_Client_Data*)e_pixmap_cdata_get(cp);
if (!cdata) return NULL;
EINA_LIST_REVERSE_FOREACH(cdata->aux_hint.hints, l, hint)
static Eina_Bool
_e_hwc_planes_ec_check(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
E_Output *eout;
int minw = 0, minh = 0;
int transform;
if (!ec) return NULL;
- cdata = e_client_cdata_get(ec);
+ cdata = ec->comp_data;
if (!cdata) return NULL;
return cdata->buffer_ref.buffer;
if (!ec) return NULL;
- cdata = e_pixmap_cdata_get(ec->pixmap);
+ cdata = (E_Comp_Wl_Client_Data *)e_pixmap_cdata_get(ec->pixmap);
EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, NULL);
wl_surface = cdata->wl_surface;
}
else
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- EHWERR("unkown buffer type:%d", NULL, hwc_window->hwc, hwc_window, cdata->buffer_ref.buffer->type);
+ EHWERR("unkown buffer type:%d", NULL, hwc_window->hwc, hwc_window, ec->comp_data->buffer_ref.buffer->type);
return EINA_FALSE;
}
goto finish;
}
- cdata = e_client_cdata_get(ec);
+ cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
if ((!cdata) || (!cdata->buffer_ref.buffer))
{
restriction = E_HWC_WINDOW_RESTRICTION_BUFFER;
e_hwc_window_name_get(hwc_window));
/* force update */
- if (e_client_cdata_get(ec))
+ if (ec->comp_data)
e_comp_wl_surface_attach(ec, recover_buffer);
else
{
hwc_window->ec, hwc_window->hwc, hwc_window, e_hwc_window_name_get(hwc_window));
}
- if (clear_attach && e_client_cdata_get(ec))
+ if (clear_attach && ec->comp_data)
e_comp_wl_surface_attach(ec, NULL);
}
else
if (!ec) return NULL;
- cdata = e_pixmap_cdata_get(ec->pixmap);
+ cdata = (E_Comp_Wl_Client_Data *)e_pixmap_cdata_get(ec->pixmap);
if (!cdata) return NULL;
wl_surface = cdata->wl_surface;
if (!ec) return NULL;
- cdata = e_client_cdata_get(ec);
+ cdata = ec->comp_data;
if (!cdata) return NULL;
return cdata->buffer_ref.buffer;
}
else
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- e_comp_wl_buffer_reference(&cdata->buffer_ref, backup_buffer);
+ e_comp_wl_buffer_reference(&ec->comp_data->buffer_ref, backup_buffer);
e_pixmap_resource_set(ec->pixmap, backup_buffer);
e_pixmap_dirty(ec->pixmap);
e_pixmap_refresh(ec->pixmap);
if (!ec) return NULL;
- cdata = e_client_cdata_get(ec);
+ cdata = ec->comp_data;
if (!cdata) return NULL;
return cdata->buffer_ref.buffer;
else
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
ec = hwc_window->ec;
if (!ec) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ if (!ec->comp_data) return;
- container = &cdata->presentation_container;
+ container = &ec->comp_data->presentation_container;
}
if (!container) return;
EINA_LIST_FOREACH(rendered_windows, l, hwc_window)
{
E_Client *ec = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
hwc_window->on_rendered_target = EINA_FALSE;
ec = hwc_window->ec;
if (!ec) continue;
- cdata = e_client_cdata_get(ec);
- if (buffer_comp_info && cdata)
+ if (buffer_comp_info && ec->comp_data)
e_presentation_time_container_feedback_merge(&buffer_comp_info->presentation_container,
- &cdata->presentation_container);
+ &ec->comp_data->presentation_container);
buffer = e_pixmap_ref_resource_get(ec->pixmap);
if (!buffer)
E_Hwc_Windows_Buffer_Comp_Info *pp_buffer_comp_info, *buffer_comp_info;
tdm_error terror = TDM_ERROR_NONE;
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(hwc, EINA_FALSE);
if (hwc->pp_hwc_window)
{
ec = hwc->pp_hwc_window->ec;
- cdata = e_client_cdata_get(ec);
- if (ec && cdata)
+ if ((ec) && (ec->comp_data))
e_presentation_time_container_feedback_merge(&pp_buffer_comp_info->presentation_container,
- &cdata->presentation_container);
+ &ec->comp_data->presentation_container);
}
else
{
Eina_Bool mapped = EINA_FALSE;
Eina_Bool transformed = EINA_FALSE;
int x = 0, y = 0, w = 0, h = 0;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (is_visible && e_client_util_ignored_get(ec)) continue;
- cdata = e_client_cdata_get(ec);
win = e_client_util_win_get(ec);
e_comp_layer_name_get(ec->layer, layer_name, sizeof(layer_name));
pid = ec->netwm.pid;
if (pid <= 0)
{
- if (cdata && cdata->surface)
- wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+ if (ec->comp_data)
+ {
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
+ if (cdata->surface)
+ wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+ }
}
if (ec->iconic)
else
iconified = 0;
- if (cdata)
- mapped = cdata->mapped;
+ if (ec->comp_data)
+ mapped = ec->comp_data->mapped;
_e_info_server_ec_hwc_info_get(ec, &hwc, &hwc_policy, &pl_zpos);
Eina_List *list_input_region = NULL;
Eina_Bool mapped = EINA_FALSE;
Eina_Bool transformed = EINA_FALSE;
- E_Comp_Wl_Client_Data *cdata = NULL;
ec = evas_object_data_get(o, "E_Client");
if (!ec) continue;
if (is_visible && e_client_util_ignored_get(ec)) continue;
- cdata = e_client_cdata_get(ec);
win = e_client_util_win_get(ec);
e_comp_layer_name_get(ec->layer, layer_name, sizeof(layer_name));
pid = ec->netwm.pid;
if (pid <= 0)
{
- if (cdata && cdata->surface)
- wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+ if (ec->comp_data)
+ {
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
+ if (cdata->surface)
+ wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+ }
}
if (ec->iconic)
else
iconified = 0;
- if (cdata)
- mapped = cdata->mapped;
+ if (ec->comp_data)
+ mapped = ec->comp_data->mapped;
_e_info_server_ec_hwc_info_get(ec, &hwc, &hwc_policy, &pl_zpos);
{
Eldbus_Message_Iter *array_of_ec;
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
Evas_Object *o;
eldbus_message_iter_arguments_append(iter, "a(ss)", &array_of_ec);
Eina_List *l;
E_Comp_Connected_Client_Info *cinfo;
+
+
Eldbus_Message_Iter* struct_of_ec;
#define __CONNECTED_CLIENTS_ARG_APPEND_TYPE(title, str, x...) ({ \
ec = evas_object_data_get(o, "E_Client");
if (!ec) continue;
if (e_client_util_ignored_get(ec)) continue;
- cdata = e_client_cdata_get(ec);
win = e_client_util_win_get(ec);
if (ec->pixmap)
res_id = e_pixmap_res_id_get(ec->pixmap);
- if (cdata && cdata->surface)
- wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+ if (ec->comp_data)
+ {
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
+ if (cdata->surface)
+ wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+ }
if (cinfo->pid == pid)
{
__CONNECTED_CLIENTS_ARG_APPEND_TYPE("[E_Client Info]", "win:0x%08zx res_id:%5d, name:%20s, geo:(%4d, %4d, %4dx%4d), layer:%5d, visible:%d, argb:%d",
static const char*
_get_win_prop_Rotation(const Evas_Object *evas_obj)
{
- E_Client *ec;
+ const E_Client *ec;
char *str = NULL;
int i, count;
static const char*
_get_win_prop_Transform(const Evas_Object *evas_obj)
{
- E_Client *ec;
+ const E_Client *ec;
char *str = NULL;
int i, count;
static const char*
_get_win_prop_Subsurface_Below_Child_List(const Evas_Object *evas_obj)
{
- E_Comp_Wl_Client_Data *cdata;
- E_Client *ec;
+ const E_Comp_Wl_Client_Data *cdata;
+ const E_Client *ec;
char *str = NULL;
const Eina_List *list;
const Eina_List *l;
- E_Client *child;
+ const E_Client *child;
ec = evas_object_data_get(evas_obj, "E_Client");
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, NULL);
- cdata = e_client_cdata_get(ec);
- if (!cdata)
+ if (!ec->comp_data)
return strdup("None");
+ cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
list = cdata->sub.below_list;
+
if (!list)
return strdup("None");
static const char*
_get_win_prop_Subsurface_Child_List(const Evas_Object *evas_obj)
{
- E_Comp_Wl_Client_Data *cdata;
- E_Client *ec;
+ const E_Comp_Wl_Client_Data *cdata;
+ const E_Client *ec;
char *str = NULL;
const Eina_List *list;
const Eina_List *l;
- E_Client *child;
+ const E_Client *child;
ec = evas_object_data_get(evas_obj, "E_Client");
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, NULL);
- cdata = e_client_cdata_get(ec);
- if (!cdata)
+ if (!ec->comp_data)
return strdup("None");
+ cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
list = cdata->sub.list;
+
if (!list)
return strdup("None");
static const char*
_get_win_prop_Subsurface_Parent(const Evas_Object *evas_obj)
{
- E_Comp_Wl_Client_Data *cdata;
- E_Client *ec;
+ const E_Comp_Wl_Client_Data *cdata;
+ const E_Client *ec;
char *str = NULL;
ec = evas_object_data_get(evas_obj, "E_Client");
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, NULL);
- cdata = e_client_cdata_get(ec);
- if (!cdata)
+ if (!ec->comp_data)
return strdup("None");
+ cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
+
if (asprintf(&str, "0x%zx", cdata->sub.data ? e_client_util_win_get(cdata->sub.data->parent) : 0) < 0)
return NULL;
static const char*
_get_win_prop_Aux_Hint(const Evas_Object *evas_obj)
{
- E_Comp_Wl_Client_Data *cdata;
+ const E_Comp_Wl_Client_Data *cdata;
const E_Comp_Wl_Aux_Hint *hint;
const Eina_List *l;
- E_Client *ec;
+ const E_Client *ec;
char *str = NULL;
ec = evas_object_data_get(evas_obj, "E_Client");
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, NULL);
- cdata = e_client_cdata_get(ec);
- if (!cdata)
+ if (!ec->comp_data)
return strdup("None");
+ cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
+
if (!cdata->aux_hint.hints)
return strdup("None");
static const char*
_get_win_prop_Video_Client(const Evas_Object *evas_obj)
{
- E_Client *ec;
- E_Comp_Wl_Client_Data *cdata;
+ const E_Client *ec;
char *str = NULL;
ec = evas_object_data_get(evas_obj, "E_Client");
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, NULL);
- cdata = e_client_cdata_get(ec);
- if (asprintf(&str, "%d", cdata ? (cdata->video_client || e_client_video_hw_composition_check((E_Client *)ec)) : 0) < 0)
+ if (asprintf(&str, "%d", ec->comp_data ? (ec->comp_data->video_client || e_client_video_hw_composition_check((E_Client *)ec)) : 0) < 0)
return NULL;
return str;
static const char*
_get_win_prop_Ignore_first_unmap(const Evas_Object *evas_obj)
{
- E_Client *ec;
+ const E_Client *ec;
char *str = NULL;
ec = evas_object_data_get(evas_obj, "E_Client");
_set_win_prop_Ignored(Evas_Object *evas_obj, const char *prop_value)
{
E_Client *ec = evas_object_data_get(evas_obj, "E_Client");
- EINA_SAFETY_ON_NULL_RETURN_VAL(ec, NULL);
if (!ec)
{
static const char*
_get_win_prop_E_Transient_Policy(const Evas_Object *evas_obj)
{
- E_Client *ec;
+ const E_Client *ec;
char *str = NULL;
ec = evas_object_data_get(evas_obj, "E_Client");
static const char*
_get_win_prop_E_FullScreen_Policy(const Evas_Object *evas_obj)
{
- E_Client *ec;
+ const E_Client *ec;
char *str = NULL;
ec = evas_object_data_get(evas_obj, "E_Client");
static const char*
_get_win_prop_E_Maximize_Policy(const Evas_Object *evas_obj)
{
- E_Client *ec;
+ const E_Client *ec;
char *str = NULL;
ec = evas_object_data_get(evas_obj, "E_Client");
static const char*
_get_win_prop_Layer(const Evas_Object *evas_obj)
{
- E_Client *ec;
+ const E_Client *ec;
char *str = NULL;
char layer_name[48] = {0,};
static const char*
_get_win_prop_Shape_input(const Evas_Object *evas_obj)
{
- E_Client *ec;
+ const E_Client *ec;
char *str = NULL;
int i = 0;
static const char*
_get_win_prop_Shape_rects(const Evas_Object *evas_obj)
{
- E_Client *ec;
+ const E_Client *ec;
char *str = NULL;
int i = 0;
static const char*
_get_win_prop_Transients(const Evas_Object *evas_obj)
{
- E_Client *ec;
+ const E_Client *ec;
char *str = NULL;
- E_Client *child;
+ const E_Client *child;
const Eina_List *l;
ec = evas_object_data_get(evas_obj, "E_Client");
static const char*
_get_win_prop_ParentWindowID(const Evas_Object *evas_obj)
{
- E_Client *ec;
+ const E_Client *ec;
char *str = NULL;
ec = evas_object_data_get(evas_obj, "E_Client");
static const char*
_get_win_prop_Geometry(const Evas_Object *evas_obj)
{
- E_Client *ec;
+ const E_Client *ec;
char *str = NULL;
ec = evas_object_data_get(evas_obj, "E_Client");
static const char*
_get_win_prop_Role(const Evas_Object *evas_obj)
{
- E_Client *ec;
+ const E_Client *ec;
char *str = NULL;
ec = evas_object_data_get(evas_obj, "E_Client");
static const char*
_get_win_prop_Window_Name(const Evas_Object *evas_obj)
{
- E_Client *ec;
+ const E_Client *ec;
char *str = NULL;
ec = evas_object_data_get(evas_obj, "E_Client");
static const char*
_get_win_prop_ResourceID(const Evas_Object *evas_obj)
{
- E_Client *ec;
+ const E_Client *ec;
char *str = NULL;
ec = evas_object_data_get(evas_obj, "E_Client");
static const char*
_get_win_prop_PID(const Evas_Object *evas_obj)
{
- E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
+ const E_Client *ec;
char *str = NULL;
pid_t pid = -1;
ec = evas_object_data_get(evas_obj, "E_Client");
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, NULL);
- cdata = e_client_cdata_get(ec);
- if (cdata && cdata->surface)
- wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+ if (ec->comp_data)
+ {
+ const E_Comp_Wl_Client_Data *cdata = (const E_Comp_Wl_Client_Data*)ec->comp_data;
+ if (cdata->surface)
+ wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+ }
if (asprintf(&str, "%d", pid) < 0)
return NULL;
static const char*
_get_win_prop_Window_ID(const Evas_Object *evas_obj)
{
- E_Client *ec;
+ const E_Client *ec;
char *str = NULL;
ec = evas_object_data_get(evas_obj, "E_Client");
else if (mode == WINDOW_PID_MODE)
{
pid_t pid = -1;
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
-
- if (cdata && cdata->surface)
- wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
-
+ if (ec->comp_data)
+ {
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
+ if (cdata->surface)
+ {
+ wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+ }
+ }
if (pid == value_number)
{
window_exists = EINA_TRUE;
{
Evas_Object *o;
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
Ecore_Window win;
int rotation = 0;
char fname[PATH_MAX];
EINA_LIST_FREE(topvwins, ec)
{
win = e_client_util_win_get(ec);
- cdata = e_client_cdata_get(ec);
- if (cdata)
- rotation = cdata->scaler.buffer_viewport.buffer.transform * 90;
+ if (ec->comp_data)
+ rotation = ec->comp_data->scaler.buffer_viewport.buffer.transform * 90;
snprintf(fname, sizeof(fname), "0x%08zx_%d", win, rotation);
s_fname = eina_stringshare_add(fname);
Eldbus_Message_Iter *iter = eldbus_message_iter_get(reply);
Eldbus_Message_Iter *array_of_ec;
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
Evas_Object *o;
eldbus_message_iter_arguments_append(iter, "a("SIGNATURE_SUBSURFACE")", &array_of_ec);
}
else
{
- cdata = e_client_cdata_get(ec);
- if (e_object_is_del(E_OBJECT(ec)) || !cdata) continue;
- if (!cdata->sub.data &&
- !cdata->sub.list && !cdata->sub.list_pending &&
- !cdata->sub.below_list && !cdata->sub.below_list_pending)
+ if (e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) continue;
+ if (!ec->comp_data->sub.data &&
+ !ec->comp_data->sub.list && !ec->comp_data->sub.list_pending &&
+ !ec->comp_data->sub.below_list && !ec->comp_data->sub.below_list_pending)
continue;
win = e_client_util_win_get(ec);
- if (cdata->sub.data)
- parent = e_client_util_win_get(cdata->sub.data->parent);
+ if (ec->comp_data->sub.data)
+ parent = e_client_util_win_get(ec->comp_data->sub.data->parent);
buffer = e_pixmap_resource_get(ec->pixmap);
if (buffer)
buf_id = (buffer->resource) ? wl_resource_get_id(buffer->resource) : (WAYLAND_SERVER_RESOURCE_ID_MASK & 99999);
if (map)
{
Evas_Coord x1, x2, y1, y2;
- E_Comp_Wl_Buffer_Viewport *vp = &cdata->scaler.buffer_viewport;
+ E_Comp_Wl_Buffer_Viewport *vp = &ec->comp_data->scaler.buffer_viewport;
evas_map_point_coord_get(map, 0, &x1, &y1, NULL);
evas_map_point_coord_get(map, 2, &x2, &y2, NULL);
x = x1, y = y1, w = x2 - x1, h = y2 - y1;
visible = evas_object_visible_get(o);
alpha = e_comp_object_alpha_get(ec->frame);
ignore = e_client_util_ignored_get(ec);
- if (cdata->sub.below_obj)
- bgrect = (Ecore_Window)cdata->sub.below_obj;
+ if (ec->comp_data->sub.below_obj)
+ bgrect = (Ecore_Window)ec->comp_data->sub.below_obj;
maskobj = e_comp_object_mask_has(ec->frame);
- video = (cdata->video_client || e_client_video_hw_composition_check(ec)) ? 1 : 0;
- if (cdata->sub.data)
- stand = cdata->sub.data->stand_alone;
+ video = (ec->comp_data->video_client || e_client_video_hw_composition_check(ec)) ? 1 : 0;
+ if (ec->comp_data->sub.data)
+ stand = ec->comp_data->sub.data->stand_alone;
name = e_client_util_name_get(ec);
if (!name)
name = "NO NAME";
_e_info_server_cb_buffer_change(void *data, int type, void *event)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Event_Client *ev = event;
Ecore_Window event_win;
char fname[PATH_MAX];
buffer = e_pixmap_resource_get(ec->pixmap);
if (!buffer) return ECORE_CALLBACK_PASS_ON;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return ECORE_CALLBACK_PASS_ON;
- rotation = cdata->scaler.buffer_viewport.buffer.transform * 90;
+ rotation = ec->comp_data->scaler.buffer_viewport.buffer.transform * 90;
event_win = e_client_util_win_get(ec);
switch (buffer->type)
_e_info_server_ec_kill(uint32_t mode, void *value, Eldbus_Message_Iter *array_of_string)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
Evas_Object *o;
int count = 0;
char result[1024];
pid = ec->netwm.pid;
if (pid <= 0)
{
- cdata = e_client_cdata_get(ec);
- if (cdata && cdata->surface)
- wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+ if (ec->comp_data)
+ {
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
+ if (cdata->surface)
+ wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+ }
}
if (pid != *(pid_t *)value)
continue;
Eldbus_Message_Iter *iter;
Eina_Bool res;
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
char *value;
uint32_t mode;
int count = 0;
ec_pid = ec->netwm.pid;
if (ec_pid <= 0)
{
- cdata = e_client_cdata_get(ec);
- if (cdata && cdata->surface)
- wl_client_get_credentials(wl_resource_get_client(cdata->surface), &ec_pid, NULL, NULL);
+ if (ec->comp_data)
+ {
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
+ if (cdata->surface)
+ wl_client_get_credentials(wl_resource_get_client(cdata->surface), &ec_pid, NULL, NULL);
+ }
}
if (ec_pid != pid)
continue;
Eldbus_Message *reply;
Eina_Bool res;
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
uint64_t win;
Ecore_Window pwin;
uint32_t res_id = 0;
pid = ec->netwm.pid;
if (pid <= 0)
{
- cdata = e_client_cdata_get(ec);
- if (cdata && cdata->surface)
- wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+ if (ec->comp_data)
+ {
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
+ if (cdata->surface)
+ wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+ }
}
_e_info_server_ec_hwc_info_get(ec, &hwc, &hwc_policy, &pl_zpos);
static void
_e_info_server_cb_wininfo_wm_hints_append(E_Client *ec, Eldbus_Message_Iter *array_of_hints)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_List *l;
E_Comp_Wl_Aux_Hint *hint;
char temp[512] = {0};
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ if (!ec->comp_data)
+ return;
- EINA_LIST_FOREACH(cdata->aux_hint.hints, l, hint)
+ EINA_LIST_FOREACH(ec->comp_data->aux_hint.hints, l, hint)
{
snprintf(temp, sizeof(temp), "%s: %s", hint->hint, hint->val);
eldbus_message_iter_arguments_append(array_of_hints, "s", temp);
E_API void
e_keyrouter_event_surface_send(E_Client *ec, int key)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
-
EINA_SAFETY_ON_NULL_RETURN(krt);
EINA_SAFETY_ON_NULL_RETURN(ec);
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN(cdata);
- EINA_SAFETY_ON_NULL_RETURN(cdata->surface);
+ EINA_SAFETY_ON_NULL_RETURN(ec->comp_data);
+ EINA_SAFETY_ON_NULL_RETURN(ec->comp_data->surface);
key = key - 8;
- e_keyrouter_wl_event_surface_send(cdata->surface, key, TIZEN_KEYROUTER_MODE_NONE);
+ e_keyrouter_wl_event_surface_send(ec->comp_data->surface, key, TIZEN_KEYROUTER_MODE_NONE);
}
E_API int
struct wl_resource *
e_keyrouter_util_get_surface_from_eclient(E_Client *client)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
- if (!client) return NULL;
- cdata = e_client_cdata_get(client);
- if (!cdata) return NULL;
+ if (!client || !client->comp_data) return NULL;
- return cdata->wl_surface;
+ return client->comp_data->wl_surface;
}
int
e_keyrouter_wl_key_send(Ecore_Event_Key *ev, Eina_Bool pressed, struct wl_client *client, struct wl_resource *surface, Eina_Bool focused)
{
E_Client *ec = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
struct wl_client *wc = NULL;
uint32_t keycode;
enum wl_keyboard_key_state state;
if ((!e_client_action_get()) && (!e_comp->input_key_grabs))
{
ec = e_client_focused_get();
- if (ec)
+ if (ec && ec->comp_data && ec->comp_data->surface)
{
- cdata = e_client_cdata_get(ec);
- if (cdata && cdata->surface)
+ if (e_comp_wl->kbd.focused)
{
- if (e_comp_wl->kbd.focused)
- {
- wc = wl_resource_get_client(cdata->surface);
- _e_keyrouter_wl_key_send(ev, state, e_comp_wl->kbd.focused, EINA_TRUE, wc, surface);
- }
-
- /* update modifier state */
- e_comp_wl_input_keyboard_state_update(keycode, pressed);
+ wc = wl_resource_get_client(ec->comp_data->surface);
+ _e_keyrouter_wl_key_send(ev, state, e_comp_wl->kbd.focused, EINA_TRUE, wc, surface);
}
+
+ /* update modifier state */
+ e_comp_wl_input_keyboard_state_update(keycode, pressed);
}
}
return !!ec;
if (!ec->frame) continue;
if (!evas_object_visible_get(ec->frame)) continue;
/* if ec is subsurface, skip this */
- cdata = e_client_cdata_get(ec);
+ cdata = (E_Comp_Wl_Client_Data *)ec->comp_data;
if (cdata && cdata->sub.data) continue;
return ec;
if (!ec->frame) continue;
if (!evas_object_visible_get(ec->frame)) continue;
/* if ec is subsurface, skip this */
- cdata = e_client_cdata_get(ec);
+ cdata = (E_Comp_Wl_Client_Data *)ec->comp_data;
if (cdata && cdata->sub.data) continue;
return ec;
if (ec->is_cursor) continue;
if (!ec->visible) continue;
if (!evas_object_visible_get(ec->frame)) continue;
- cdata = e_client_cdata_get(ec);
+ cdata = (E_Comp_Wl_Client_Data *)ec->comp_data;
if (cdata && cdata->sub.data) continue; /* skip subsurface */
if (cdata && !cdata->mapped) continue;
if (ec->iconic) continue;
_e_output_client_resize(int w, int h)
{
E_Client *ec = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
+ E_Comp_Client_Data *cdata = NULL;
E_CLIENT_FOREACH(ec)
{
if ((ec->visible && !ec->input_only) ||
(e_client_util_name_get(ec) != NULL && !ec->input_only))
{
- cdata = e_client_cdata_get(ec);
+ cdata = ec->comp_data;
if (cdata == NULL) continue;
if (cdata->shell.configure_send == NULL) continue;
- cdata->shell.configure_send(cdata->shell.surface, 0, w ,h);
+ cdata->shell.configure_send(ec->comp_data->shell.surface, 0, w ,h);
}
}
}
e_pixmap_size_changed(E_Pixmap *cp, int w, int h)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
-
EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(cp->client, EINA_FALSE);
if (cp->dirty) return EINA_TRUE;
ec = cp->client;
- EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
-
- cdata = e_client_cdata_get(ec);
- if (!cdata|| e_object_is_del(E_OBJECT(ec)))
+ if (!ec->comp_data || e_object_is_del(E_OBJECT(ec)))
return (w != cp->w) || (h != cp->h);
- return (w != cdata->width_from_buffer) || (h != cdata->height_from_buffer);
+ return (w != ec->comp_data->width_from_buffer) || (h != ec->comp_data->height_from_buffer);
}
E_API Eina_Bool
e_pixmap_size_get(E_Pixmap *cp, int *w, int *h)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
-
if (w) *w = 0;
if (h) *h = 0;
EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(cp->client, EINA_FALSE);
ec = cp->client;
- EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
-
- cdata = e_client_cdata_get(ec);
- if (!cdata || e_object_is_del(E_OBJECT(ec)))
+ if (!ec->comp_data || e_object_is_del(E_OBJECT(ec)))
{
if (w) *w = cp->w;
if (h) *h = cp->h;
return (cp->w > 0) && (cp->h > 0);
}
- if (w) *w = cdata->width_from_buffer;
- if (h) *h = cdata->height_from_buffer;
- return (cdata->width_from_buffer > 0) && (cdata->height_from_buffer > 0);
+ if (w) *w = ec->comp_data->width_from_buffer;
+ if (h) *h = ec->comp_data->height_from_buffer;
+ return (ec->comp_data->width_from_buffer > 0) && (ec->comp_data->height_from_buffer > 0);
}
E_API unsigned int
cp->failures = 0;
if (cache)
{
- E_Comp_Wl_Client_Data *cdata;
+ E_Comp_Wl_Client_Data *cd;
struct wl_resource *cb;
Eina_List *l, *ll;
- if (!cp->client) return;
- cdata = e_client_cdata_get(cp->client);
- if ((!cdata)) return;
-
- EINA_LIST_FOREACH_SAFE(cdata->frames, l, ll, cb)
+ if ((!cp->client) || (!cp->client->comp_data)) return;
+ cd = (E_Comp_Wl_Client_Data *)cp->client->comp_data;
+ EINA_LIST_FOREACH_SAFE(cd->frames, l, ll, cb)
{
wl_callback_send_done(cb, (unsigned int)(ecore_loop_time_get() * 1000));
wl_resource_destroy(cb);
E_API void
e_pixmap_cdata_set(E_Pixmap *cp, E_Comp_Wl_Client_Data *cdata)
{
+ E_Comp_Wl_Client_Data *cd = (E_Comp_Wl_Client_Data*)cdata;
+
EINA_SAFETY_ON_NULL_RETURN(cp);
if (cp->cdata)
{
if (cp->own_cdata)
{
- if (cdata)
+ if (cd)
{
- cdata->wl_surface = cp->cdata->wl_surface;
- cdata->scaler.viewport = cp->cdata->scaler.viewport;
- cdata->pending.buffer_viewport = cp->cdata->pending.buffer_viewport;
+ cd->wl_surface = cp->cdata->wl_surface;
+ cd->scaler.viewport = cp->cdata->scaler.viewport;
+ cd->pending.buffer_viewport = cp->cdata->pending.buffer_viewport;
}
E_FREE(cp->cdata);
}
}
- cp->cdata = cdata;
+ cp->cdata = cd;
}
E_API E_Pixmap_Hook *
static void
_e_pixmap_buffer_clear(E_Pixmap *cp, Eina_Bool only_free)
{
- E_Comp_Wl_Client_Data *cp_cdata;
+ E_Comp_Wl_Client_Data *cdata;
struct wl_resource *cb;
Eina_List *l, *ll;
/* if not only free, client should be iconic state */
if (!only_free && !e_policy_visibility_client_is_iconic(cp->client)) return;
- cp_cdata = e_client_cdata_get(cp->client);
-
DBG("PIXMAP: Buffer Flush(%s) '%s'(%p) only_free:%d", cp->shm_flusher ? "SHM" : "NATIVE",
cp->client->icccm.name?:"", cp->client, only_free);
}
else
{
- if ((cp->buffer) && (cp_cdata))
+ if ((cp->buffer) && (cp->client->comp_data))
{
if ((cp->buffer->type == E_COMP_WL_BUFFER_TYPE_TBM) ||
(cp->buffer->type == E_COMP_WL_BUFFER_TYPE_NATIVE))
struct wayland_tbm_client_queue * cqueue;
cqueue = wayland_tbm_server_client_queue_get(e_comp_wl->tbm.server,
- cp_cdata->wl_surface);
+ cp->client->comp_data->wl_surface);
if (!cqueue) return;
if (only_free)
if (!only_free)
{
/* release the helded buffer by e_client */
- if (cp_cdata)
+ if (cp->client->comp_data)
{
/* release the helded buffer by e_client */
- e_comp_wl_buffer_reference(&cp_cdata->buffer_ref, NULL);
- e_presentation_time_container_feedback_discard(&cp_cdata->presentation_container);
+ e_comp_wl_buffer_reference(&cp->client->comp_data->buffer_ref, NULL);
+ e_presentation_time_container_feedback_discard(&cp->client->comp_data->presentation_container);
}
/* composite object clear */
e_comp_object_clear(cp->client->frame);
/* pending frame event callback*/
- if (!cp_cdata) return;
- EINA_LIST_FOREACH_SAFE(cp_cdata->frames, l, ll, cb)
+ if (!cp->client->comp_data) return;
+ cdata = (E_Comp_Wl_Client_Data *)cp->client->comp_data;
+ EINA_LIST_FOREACH_SAFE(cdata->frames, l, ll, cb)
{
wl_callback_send_done(cb, (unsigned int)(ecore_loop_time_get() * 1000));
wl_resource_destroy(cb);
static E_Comp_Wl_Buffer *
_get_comp_wl_buffer(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
if (!cdata) return NULL;
E_Comp_Wl_Buffer_Ref *buffer_ref = &cdata->buffer_ref;
tbm_surface_h tsurface = NULL;
E_Plane_Renderer *renderer = plane->renderer;
E_Client *ec = plane->ec;
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
E_Comp_Wl_Buffer *buffer = NULL;
- buffer = cdata->buffer_ref.buffer;
+ buffer = ec->comp_data->buffer_ref.buffer;
if (!buffer) return NULL;
if (!e_comp_object_hwc_update_exists(ec->frame)) return NULL;
if (!ec) return NULL;
- cdata = e_client_cdata_get(ec);
+ cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
if (!cdata) return NULL;
E_Comp_Wl_Buffer_Ref *buffer_ref = &cdata->buffer_ref;
if (!ec) return NULL;
- cdata = e_client_cdata_get(ec);
+ cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
if (!cdata) return NULL;
E_Comp_Wl_Buffer_Ref *buffer_ref = &cdata->buffer_ref;
EINA_SAFETY_ON_NULL_RETURN_VAL(wl_cdata, NULL);
- cdata = e_pixmap_cdata_get(ec->pixmap);
+ cdata = (E_Comp_Wl_Client_Data *)e_pixmap_cdata_get(ec->pixmap);
EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, NULL);
wl_surface = cdata->wl_surface;
if (!plane->ec_redirected) return;
if (!ec) return;
- cdata = e_client_cdata_get(ec);
+ cdata = ec->comp_data;
if (!cdata) return;
if (!cdata->mapped) return;
tbm_surface_error_e ret = TBM_SURFACE_ERROR_NONE;
tbm_surface_info_s tsurface_info;
E_Pointer *pointer = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(renderer, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
output = plane->output;
EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
- cdata = e_client_cdata_get(ec);
- buffer = cdata->buffer_ref.buffer;
+ buffer = ec->comp_data->buffer_ref.buffer;
EINA_SAFETY_ON_NULL_RETURN_VAL(buffer, EINA_FALSE);
pointer = e_pointer_get(ec);
}
else
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- ERR("unkown buffer type:%d", cdata->buffer_ref.buffer->type);
+ ERR("unkown buffer type:%d", ec->comp_data->buffer_ref.buffer->type);
return EINA_FALSE;
}
e_pointer_object_set(E_Pointer *ptr, Evas_Object *obj, int x, int y)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
EINA_SAFETY_ON_NULL_RETURN(ptr);
ec = e_comp_object_client_get(ptr->o_ptr);
if ((ec) && (!e_object_is_del(E_OBJECT(ec))))
{
- cdata = e_client_cdata_get(ec);
ec->hidden = 1;
ec->visible = EINA_FALSE;
ec->visibility.obscured = E_VISIBILITY_FULLY_OBSCURED;
- cdata->mapped = EINA_FALSE;
+ ec->comp_data->mapped = EINA_FALSE;
ec->override = 1; /* ignore the previous cursor_ec */
}
ec = e_comp_object_client_get(obj);
if (ec && e_pixmap_usable_get(ec->pixmap))
{
- cdata = e_client_cdata_get(ec);
ec->hidden = 0;
ec->visible = EINA_TRUE;
ec->visibility.obscured = E_VISIBILITY_UNOBSCURED;
evas_object_geometry_set(ec->frame, ec->x, ec->y, ec->w, ec->h);
- cdata->mapped = EINA_TRUE;
+ ec->comp_data->mapped = EINA_TRUE;
ec->override = 0; /* do not ignore the cursor_ec to set the image object */
if (e_comp_is_on_overlay(ec))
Eina_Bool
e_policy_client_is_conformant(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
-
E_OBJECT_CHECK_RETURN(ec, EINA_FALSE);
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data *)ec->comp_data;
if (cdata->conformant == 1)
{
return EINA_TRUE;
Eina_Bool
e_policy_client_is_subsurface(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata= NULL;
+ E_Comp_Wl_Client_Data *cd;
E_OBJECT_CHECK_RETURN(ec, EINA_FALSE);
E_OBJECT_TYPE_CHECK_RETURN(ec, E_CLIENT_TYPE, EINA_FALSE);
- cdata = e_client_cdata_get(ec);
- if (cdata && cdata->sub.data)
+ cd = (E_Comp_Wl_Client_Data *)ec->comp_data;
+ if (cd && cd->sub.data)
return EINA_TRUE;
return EINA_FALSE;
E_API Eina_Bool
e_policy_aux_message_use_get(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
-
E_OBJECT_CHECK_RETURN(ec, EINA_FALSE);
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data *)ec->comp_data;
if (cdata->aux_hint.use_msg)
{
return EINA_TRUE;
{
Conformant_Client *cfc;
Conformant_Wl_Res *cres;
- E_Comp_Wl_Client_Data *cfc_cdata = NULL;
uint32_t conf_type;
Eina_List *l;
Eina_Bool wait_ack = EINA_FALSE;
cres->ack_done = EINA_FALSE;
if (!cres->use_ack)
{
- cfc_cdata = e_client_cdata_get(cfc->ec);
cres->ack_done = EINA_TRUE;
tizen_policy_send_conformant_area
(cres->res,
- cfc_cdata->surface,
+ cfc->ec->comp_data->surface,
conf_type,
(unsigned int)visible, x, y, w, h);
}
{
uint32_t serial;
serial = wl_display_next_serial(e_comp_wl->wl.disp);
- cfc_cdata = e_client_cdata_get(cfc->ec);
tizen_policy_send_conformant_region
(cres->res,
- cfc_cdata->surface,
+ cfc->ec->comp_data->surface,
conf_type,
(unsigned int)visible, x, y, w, h, serial);
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;
{
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 (!child_ec->comp_data) continue;
+ if (!child_ec->comp_data->mapped && !child_ec->use_splash) continue;
if (child_ec->transient_policy == E_TRANSIENT_BELOW) continue;
if ((child_ec->exp_iconify.skip_iconify == EINA_TRUE) ||
_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;
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 (above_ec->comp_data && !above_ec->comp_data->mapped) continue;
e_client_geometry_get(above_ec, &ax, &ay, &aw, &ah);
if (!E_CONTAINS(ax, ay, aw, ah, ex, ey, ew, eh)) continue;
{
if (!above_ec->iconic)
{
- if (above_cdata && above_cdata->mapped)
+ if (above_ec->comp_data && above_ec->comp_data->mapped)
alpha_opaque = EINA_TRUE;
}
}
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);
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data *)ec->comp_data;
if (cdata && !cdata->mapped) return;
if (e_config->transient.iconify)
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);
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data *)ec->comp_data;
if (cdata && !cdata->mapped) return;
_e_policy_client_ancestor_uniconify(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;
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 (above->comp_data && !above->comp_data->mapped) continue;
e_client_geometry_get(above, &ax, &ay, &aw, &ah);
if (!E_CONTAINS(ax, ay, aw, ah, ex, ey, ew, eh)) continue;
{
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;
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 (above->comp_data && !above->comp_data->mapped) continue;
e_client_geometry_get(above, &ax, &ay, &aw, &ah);
if (!E_CONTAINS(ax, ay, aw, ah, ex, ey, ew, eh)) continue;
_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;
return EINA_FALSE;
}
- cdata = e_client_cdata_get(ec);
- if (cdata && !cdata->mapped)
+ if (ec->comp_data && !ec->comp_data->mapped)
{
ELOGF("POL_VIS", "Not mapped. no need to uniconify render.", ec);
return EINA_FALSE;
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;
(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 && ec->comp_data && !ec->comp_data->mapped) return EINA_FALSE;
/* check iconify window by client */
if ((ec->iconic) && (ec->exp_iconify.by_client)) return EINA_FALSE;
/* check background state */
_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;
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 (above->comp_data && !above->comp_data->mapped)
continue;
}
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 (ec->comp_data && !ec->comp_data->mapped) 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;
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 ((ec->comp_data) && (!ec->comp_data->mapped))
{
VS_DBG(ec, "client Unmapped.");
return EINA_FALSE;
static E_Policy_Wl_Surface *
_e_policy_wl_surf_add(E_Client *ec, struct wl_resource *res_tzpol)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
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;
- cdata = e_client_cdata_get(ec);
- if (wl_resource_get_client(cdata->surface) == wl_resource_get_client(res_tzpol))
- psurf->surf = cdata->surface;
+ if (wl_resource_get_client(ec->comp_data->surface) == wl_resource_get_client(res_tzpol))
+ psurf->surf = ec->comp_data->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 = NULL;
E_Policy_Wl_Tzpol *tzpol;
E_Policy_Wl_Surface *psurf;
struct wl_resource *res_tzvis;
sent_vis = -3;
}
- cdata = e_client_cdata_get(ec);
- if (cdata && cdata->mapped)
+ if (ec->comp_data && ec->comp_data->mapped)
{
_launch_effect_hide(ec->netwm.pid);
}
res_tzvis,
ver,
sent_vis,
- ec->netwm.pid, cdata, ec->icccm.title, ec->netwm.name);
+ ec->netwm.pid, ec->comp_data, 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 = NULL;
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;
- cdata = e_client_cdata_get(ec);
- if (cdata && !cdata->mapped)
+ if (ec->comp_data && !ec->comp_data->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 = NULL;
Eina_Bool check_ancestor = EINA_FALSE;
Eina_Bool intercepted = EINA_FALSE;
e_policy_stack_below(ec, below_ec);
- cdata = e_client_cdata_get(ec);
- if (cdata && !cdata->mapped)
+ if ((ec->comp_data) && (!ec->comp_data->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 = NULL;
E_Client *above_ec = NULL;
E_Client *parent_ec = NULL;
Eina_Bool check_ancestor = EINA_FALSE;
e_policy_stack_above(ec, above_ec);
- cdata = e_client_cdata_get(ec);
- if (cdata && !cdata->mapped)
+ if ((ec->comp_data) && (!ec->comp_data->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 = NULL;
ec = wl_resource_get_user_data(surf);
EINA_SAFETY_ON_NULL_RETURN(ec);
e_client_raise(ec);
- cdata = e_client_cdata_get(ec);
- if (cdata && !cdata->mapped)
+ if ((ec->comp_data) && (!ec->comp_data->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 = NULL;
ec = wl_resource_get_user_data(surf);
EINA_SAFETY_ON_NULL_RETURN(ec);
if (e_policy_visibility_client_lower(ec))
return;
- cdata = e_client_cdata_get(ec);
- if (cdata && !cdata->mapped)
+ if ((ec->comp_data) && (!ec->comp_data->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 = NULL;
ec = e_pixmap_find_client_by_res_id(res_id);
EINA_SAFETY_ON_NULL_RETURN(ec);
e_client_lower(ec);
- cdata = e_client_cdata_get(ec);
- if (cdata && !cdata->mapped)
+ if ((ec->comp_data) && (!ec->comp_data->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 = NULL;
EINA_SAFETY_ON_NULL_RETURN(role);
}
else if (!e_util_strcmp("cbhm", role))
{
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- e_comp_wl->selection.cbhm = cdata->surface;
+ if (!ec->comp_data) return;
+ e_comp_wl->selection.cbhm = ec->comp_data->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 = NULL, *pc_cdata = NULL;
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);
- pc_cdata = e_client_cdata_get(pc);
- EINA_SAFETY_ON_NULL_RETURN(pc_cdata);
+ EINA_SAFETY_ON_NULL_RETURN(pc->comp_data);
- parent_surf = pc_cdata->surface;
+ parent_surf = pc->comp_data->surface;
_e_policy_wl_parent_surf_set(ec, parent_surf);
" |win:0x%08zx|child |s:%8p",
ec,
e_client_util_win_get(ec),
- (cdata ? cdata->surface : NULL));
+ (ec->comp_data ? ec->comp_data->surface : NULL));
tizen_policy_send_transient_for_done(res_tzpol, child_id);
{
E_Client *ec;
E_Client *epc;
- E_Comp_Wl_Client_Data *cdata = NULL, *epc_cdata = NULL;;
E_Comp_Wl_Subsurf_Data *sdata;
ec = wl_resource_get_user_data(subsurf);
EINA_SAFETY_ON_NULL_RETURN(ec);
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN(cdata);
+ EINA_SAFETY_ON_NULL_RETURN(ec->comp_data);
- sdata = cdata->sub.data;
+ sdata = ec->comp_data->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);
/* check if a subsurface has already placed below a parent */
- if (eina_list_data_find(epc_cdata->sub.below_list, ec)) return;
+ if (eina_list_data_find(epc->comp_data->sub.below_list, ec)) return;
ELOGF("TZPOL", "SUBSURF|BELOW_PARENT", 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_append(epc_cdata->sub.below_list, ec);
- epc_cdata->sub.list_changed = EINA_TRUE;
+ 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_append(epc->comp_data->sub.below_list, ec);
+ epc->comp_data->sub.list_changed = EINA_TRUE;
/* NOTE
* The stacking order of sub-surface should be actually updated when state
_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 = NULL;
E_Comp_Wl_Subsurf_Data *sdata;
ec = wl_resource_get_user_data(subsurf);
EINA_SAFETY_ON_NULL_RETURN(ec);
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN(cdata);
+ EINA_SAFETY_ON_NULL_RETURN(ec->comp_data);
- sdata = cdata->sub.data;
+ sdata = ec->comp_data->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 = NULL;
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 (cdata && cdata->sub.data)
+ if ((ec->comp_data) && (ec->comp_data->sub.data))
{
wl_resource_post_error(resource,
WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE,
}
/* ec's parent comes from another process */
- if (cdata)
- cdata->has_extern_parent = EINA_TRUE;
+ if (ec->comp_data)
+ ec->comp_data->has_extern_parent = EINA_TRUE;
}
static void
static void
_e_policy_wl_aux_hint_apply(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Comp_Wl_Aux_Hint *hint;
Eina_List *l;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
- if (!cdata->aux_hint.changed) return;
+ if (!ec->comp_data) return;
+ if (!ec->comp_data->aux_hint.changed) return;
- EINA_LIST_FOREACH(cdata->aux_hint.hints, l, hint)
+ EINA_LIST_FOREACH(ec->comp_data->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")))
- cdata->aux_hint.use_msg = EINA_FALSE;
+ ec->comp_data->aux_hint.use_msg = EINA_FALSE;
else if (!strcmp(hint->val, "1"))
- cdata->aux_hint.use_msg = EINA_TRUE;
+ ec->comp_data->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")))
- cdata->never_hwc = EINA_FALSE;
+ ec->comp_data->never_hwc = EINA_FALSE;
else if (!strcmp(hint->val, "1"))
- cdata->never_hwc = EINA_TRUE;
+ ec->comp_data->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 = NULL;
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);
- cdata = e_client_cdata_get(ec);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, NULL);
- dpy_surf->surf = cdata->surface;
+ dpy_surf->surf = ec->comp_data->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 = NULL;
if (!(ec = wl_resource_get_user_data(resource))) return;
- if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ if (e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) return;
- cdata->sub.watcher = NULL;
+ ec->comp_data->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 = NULL;
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;
}
- cdata->sub.watcher = res;
+ ec->comp_data->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 = NULL, *pc_cdata = NULL;
struct wl_resource *parent_surf;
ELOGF("TZPOL",
}
else
{
- pc_cdata = e_client_cdata_get(pc);
- EINA_SAFETY_ON_NULL_RETURN(pc_cdata);
+ EINA_SAFETY_ON_NULL_RETURN(pc->comp_data);
- parent_surf = pc_cdata->surface;
+ parent_surf = pc->comp_data->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),
- (cdata ? cdata->surface : NULL));
+ (ec->comp_data ? ec->comp_data->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 = NULL;
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 (cdata->has_video_client == has) return;
+ if (ec->comp_data->has_video_client == has) return;
ELOGF("TZPOL", "video client has(%d)", ec, has);
- cdata->has_video_client = has;
+ ec->comp_data->has_video_client = has;
}
static void
continue;
/* if ec is subsurface, skip this */
- cdata = e_client_cdata_get(ec);
+ cdata = (E_Comp_Wl_Client_Data *)ec->comp_data;
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 = NULL;
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);
- cdata = e_client_cdata_get(ec);
- if (cdata)
- surf = cdata->surface;
+ if (ec->comp_data)
+ surf = ec->comp_data->surface;
else
surf = NULL;
Eina_Bool res;
Eina_List *clients;
E_Client *ec, *found = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
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;
- cdata = e_client_cdata_get(ec);
- if (cdata && cdata->surface)
+ if (ec->comp_data && ec->comp_data->surface)
{
- _wc = wl_resource_get_client(cdata->surface);
+ _wc = wl_resource_get_client(ec->comp_data->surface);
if (_wc == client)
found = ec;
}
EINTERN void
e_policy_wl_clipboard_data_selected_send(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
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,
- cdata ? cdata->surface : NULL);
+ ec->comp_data? ec->comp_data->surface : NULL);
}
static void
_e_policy_wl_cb_hook_shell_surface_ready(void *d, E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
-
if (EINA_UNLIKELY(!ec))
return;
e_client_base_output_resolution_transform_adjust(ec);
- cdata = e_client_cdata_get(ec);
- if ((cdata->shell.configure_send) &&
- (cdata->shell.surface))
+ if ((ec->comp_data->shell.configure_send) &&
+ (ec->comp_data->shell.surface))
{
int w = 0, h = 0;
if (ec->lock_client_size)
w = ec->w;
h = ec->h;
}
- cdata->shell.configure_send(cdata->shell.surface, 0, w, h);
+ ec->comp_data->shell.configure_send(ec->comp_data->shell.surface,
+ 0, w, h);
}
}
const char *val,
Eina_List *options)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
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)
uint32_t callback)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Presentation_Time_Feedback *feedback;
ec = wl_resource_get_user_data(surface_resource);
if (!ec) return;
if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
feedback = E_NEW(E_Presentation_Time_Feedback, 1);
if (!feedback)
PRSTT_TRACE("feedback:%p Create", NULL, feedback);
- e_presentation_time_container_feedback_set(&cdata->pending.presentation_container,
+ e_presentation_time_container_feedback_set(&ec->comp_data->pending.presentation_container,
feedback);
}
{
E_Process *pinfo = NULL;
E_Client *ec = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
Eina_Bool freeze = EINA_TRUE;
Eina_List *l;
EINA_LIST_FOREACH(pinfo->ec_list, l, ec)
{
- cdata = e_client_cdata_get(ec);
- if (cdata &&
- cdata->sub.data &&
- cdata->sub.data->parent)
+ if (ec->comp_data &&
+ ec->comp_data->sub.data &&
+ ec->comp_data->sub.data->parent)
continue;
if (ec->visible && !ec->iconic)
{
if (e_object_is_del(E_OBJECT(ec))) continue;
if (e_client_util_ignored_get(ec)) continue;
- if (!e_client_cdata_get(ec)) continue;
+ if (!ec->comp_data) continue;
slot_client = eina_hash_find(_e_slot_g->hash_slot_clients, &ec);
if (!slot_client) continue;
{
if (e_object_is_del(E_OBJECT(slot_client->ec))) return;
if (e_client_util_ignored_get(slot_client->ec)) return;
- if (!e_client_cdata_get(slot_client->ec)) return;
+ if (!slot_client->ec->comp_data) return;
e_client_geometry_get(slot_client->ec, &x, &y, &w, &h);
static Eina_Bool
_e_client_shsurface_assignable_check(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
-
if (!e_shell_e_client_shell_assignable_check(ec))
{
ERR("Could not assign shell", ec);
- cdata = e_client_cdata_get(ec);
- wl_resource_post_error(cdata->surface,
+ wl_resource_post_error(ec->comp_data->surface,
WL_DISPLAY_ERROR_INVALID_OBJECT,
"Could not assign shell surface to wl_surface");
return EINA_FALSE;
static Eina_Bool
_e_client_xdg_shell_v6_assigned_check(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- return !!cdata->sh_v6.res_role;
+ return !!ec->comp_data->sh_v6.res_role;
}
static void
struct wl_resource *resource,
E_Comp_Wl_Sh_Surf_Role role)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
-
- if (!ec) return;
- if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
-
- cdata->sh_v6.res_role = resource;
- cdata->sh_v6.role = role;
+ if ((!ec) || (!ec->comp_data) || (e_object_is_del(E_OBJECT(ec))))
+ return;
+ ec->comp_data->sh_v6.res_role = resource;
+ ec->comp_data->sh_v6.role = role;
}
static void
_e_client_xdg_shell_v6_role_assingment_unset(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
-
- if (!ec) return;
- if (e_object_is_del(E_OBJECT(ec))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
-
+ if ((!ec) || (!ec->comp_data) || (e_object_is_del(E_OBJECT(ec))))
+ return;
_e_client_xdg_shell_v6_assign(ec, NULL, E_COMP_WL_SH_SURF_ROLE_NONE);
}
static void
_e_xdg_popup_parent_set(E_Xdg_Popup *popup, E_Xdg_Surface *parent)
{
- E_Comp_Wl_Client_Data *parent_cdata = NULL;
-
- parent_cdata = e_client_cdata_get(parent->ec);
- if (!parent_cdata) return;
-
popup->parent = parent;
/* set this client as a transient for parent */
- e_shell_e_client_parent_set(popup->base.ec, parent_cdata->surface);
+ e_shell_e_client_parent_set(popup->base.ec, parent->ec->comp_data->surface);
}
static void
_e_xdg_toplevel_committed(E_Xdg_Toplevel *toplevel)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
int pw, ph;
ec = toplevel->base.ec;
return;
}
- cdata = e_client_cdata_get(ec);
- if (!cdata)
+ if (!ec->comp_data)
{
- ERR("E_Client must have E_Comp_Wl_Client_Data", ec);
+ ERR("E_Client must have E_Comp_Client_Data", ec);
return;
}
e_pixmap_size_get(ec->pixmap, &pw, &ph);
if ((toplevel->next.state.maximized || toplevel->next.state.fullscreen) &&
- (toplevel->next.size.w != cdata->shell.window.w ||
- toplevel->next.size.h != cdata->shell.window.h ||
+ (toplevel->next.size.w != ec->comp_data->shell.window.w ||
+ toplevel->next.size.h != ec->comp_data->shell.window.h ||
toplevel->next.size.w != pw ||
toplevel->next.size.h != ph))
{
toplevel->next.state.maximized,
toplevel->next.state.fullscreen,
toplevel->next.size.w, toplevel->next.size.h,
- cdata->shell.window.w, cdata->shell.window.h,
+ ec->comp_data->shell.window.w, ec->comp_data->shell.window.h,
pw, ph);
/* TODO Disable this part for now, but need to consider enabling it later.
* To enable this part, we first need to ensure that do not send configure
{
E_Xdg_Toplevel *toplevel, *parent;
E_Client *pc;
- E_Comp_Wl_Client_Data *pc_cdata = NULL;
struct wl_resource *parent_wsurface = NULL;
toplevel = wl_resource_get_user_data(resource);
return;
}
- pc_cdata = e_client_cdata_get(pc);
- if (!pc_cdata) return;
- parent_wsurface = pc_cdata->surface;
+ if (!pc->comp_data) return;
+
+ parent_wsurface = pc->comp_data->surface;
}
/* set this client as a transient for parent */
EINA_SAFETY_ON_NULL_GOTO(exsurf, end);
EINA_SAFETY_ON_NULL_GOTO(exsurf->ec, end);
- EINA_SAFETY_ON_NULL_GOTO(e_client_cdata_get(exsurf->ec), end);
+ EINA_SAFETY_ON_NULL_GOTO(exsurf->ec->comp_data, end);
EINA_SAFETY_ON_NULL_GOTO(exsurf->resource, end);
if (e_object_is_del(E_OBJECT(exsurf->ec)))
{
E_Xdg_Surface *exsurf;
E_Event_Client *ev;
- E_Comp_Wl_Client_Data *exsurf_cdata;
exsurf = (E_Xdg_Surface *)data;
ev = (E_Event_Client *)event;
if (exsurf->has_window_geometry)
{
exsurf->has_window_geometry = EINA_FALSE;
- exsurf_cdata = e_client_cdata_get(exsurf->ec);
- EINA_RECTANGLE_SET(&exsurf_cdata->shell.window,
+ EINA_RECTANGLE_SET(&exsurf->ec->comp_data->shell.window,
exsurf->window_geometry.x,
exsurf->window_geometry.y,
exsurf->window_geometry.w,
{
E_Policy_Cbhm *cbhm;
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
cbhm = d;
if (EINA_UNLIKELY(!cbhm))
if (ec->frame != obj)
return;
- cdata = e_client_cdata_get(ec);
- if ((!cbhm->show_block) && (cdata->mapped))
+ if ((!cbhm->show_block) &&
+ (ec->comp_data->mapped))
cbhm->show_block = EINA_TRUE;
}
e_service_cbhm_client_set(E_Client *ec)
{
E_Policy_Cbhm *cbhm;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (EINA_UNLIKELY(!ec))
{
// set skip iconify
ec->exp_iconify.skip_iconify = 1;
- cdata = e_client_cdata_get(ec);
- e_comp_wl->selection.cbhm = cdata->surface;
+ e_comp_wl->selection.cbhm = ec->comp_data->surface;
e_client_window_role_set(ec, "cbhm");
e_policy_conformant_part_add(ec);
static void
_launcher_target_ec_queue_flush(E_Service_Launcher *lc)
{
- E_Comp_Wl_Client_Data *target_cdata = NULL;
struct wayland_tbm_client_queue *cqueue;
if (!e_comp_wl) return;
if (!lc) return;
if (!lc->target.ec) return;
- target_cdata = e_client_cdata_get(lc->target.ec);
- if (!target_cdata) return;
- if (!target_cdata->wl_surface) return;
+ if (!lc->target.ec->comp_data) return;
+ if (!lc->target.ec->comp_data->wl_surface) return;
if (e_object_is_del(E_OBJECT(lc->target.ec))) return;
- cqueue = wayland_tbm_server_client_queue_get(e_comp_wl->tbm.server, target_cdata->wl_surface);
+ cqueue = wayland_tbm_server_client_queue_get(e_comp_wl->tbm.server,
+ lc->target.ec->comp_data->wl_surface);
if (cqueue)
wayland_tbm_server_client_queue_flush(cqueue);
}
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, target_ec->comp_data->mapped, 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");
_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;
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 (prov_ec->comp_data->mapped) continue;
if (!(lc = _launcher_handler_launcher_find(prov_ec))) continue;
if (!lc->launched_ec) continue;
{
Evas_Event_Mouse_Down *e = event;
uint32_t serial;
- E_Comp_Wl_Client_Data *volume_cdata = e_client_cdata_get(_volume_ec);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
wl_touch_send_down(_volume_wl_touch, serial, e->timestamp,
- volume_cdata->surface, 0,
+ _volume_ec->comp_data->surface, 0,
wl_fixed_from_int(e->canvas.x - _volume_ec->client.x),
wl_fixed_from_int(e->canvas.y - _volume_ec->client.y));
}
{
Evas_Event_Multi_Down *e = event;
uint32_t serial;
- E_Comp_Wl_Client_Data *volume_cdata = e_client_cdata_get(_volume_ec);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
wl_touch_send_down(_volume_wl_touch, serial, e->timestamp,
- volume_cdata->surface, e->device,
+ _volume_ec->comp_data->surface, e->device,
wl_fixed_from_int(e->canvas.x - _volume_ec->client.x),
wl_fixed_from_int(e->canvas.y - _volume_ec->client.y));
}
Eina_List *l;
struct wl_client *wc;
struct wl_resource *res;
- E_Comp_Wl_Client_Data *volume_cdata = e_client_cdata_get(_volume_ec);
if (_volume_wl_touch) goto end;
-
- wc = wl_resource_get_client(volume_cdata->surface);
+
+ wc = wl_resource_get_client(_volume_ec->comp_data->surface);
EINA_LIST_FOREACH(e_comp_wl->touch.resources, l, res)
{
if (wl_resource_get_client(res) != wc) continue;
_e_client_video_ec_offscreen_parent_get(E_Client *ec)
{
E_Client *parent = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL, *parent_cdate = NULL;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->sub.data)
+ if (!ec->comp_data || !ec->comp_data->sub.data)
return NULL;
- parent = cdata->sub.data->parent;
+ parent = ec->comp_data->sub.data->parent;
while (parent)
{
- parent_cdate = e_client_cdata_get(parent);
- if (!parent_cdate || !parent_cdate->sub.data)
+ if (!parent->comp_data || !parent->comp_data->sub.data)
return NULL;
- if (parent_cdate->sub.data->remote_surface.offscreen_parent)
- return parent_cdate->sub.data->remote_surface.offscreen_parent;
+ if (parent->comp_data->sub.data->remote_surface.offscreen_parent)
+ return parent->comp_data->sub.data->remote_surface.offscreen_parent;
- parent = parent_cdate->sub.data->parent;
+ parent = parent->comp_data->sub.data->parent;
}
return NULL;
struct wl_resource *surface)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (!(ec = wl_resource_get_user_data(surface))) return;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return;
+ if (!ec->comp_data) return;
- if (cdata->scaler.viewport)
+ if (ec->comp_data && ec->comp_data->scaler.viewport)
{
wl_resource_post_error(resource,
TIZEN_VIDEO_ERROR_VIEWPORT_EXISTS,
EINTERN void
e_comp_wl_video_buffer_transform_scale_size_get(E_Client *ec, int *bw, int *bh)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
E_Comp_Wl_Buffer *buffer = e_pixmap_resource_get(ec->pixmap);
- E_Comp_Wl_Buffer_Viewport *vp = &cdata->scaler.buffer_viewport;
+ E_Comp_Wl_Buffer_Viewport *vp = &ec->comp_data->scaler.buffer_viewport;
int w, h, transform;
if (bw) *bw = 0;
_e_video_hwc_client_offscreen_parent_get(E_Client *ec)
{
E_Client *parent = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL, *parent_cdata = NULL;
- cdata = e_client_cdata_get(ec);
- if (!cdata || !cdata->sub.data)
+ if (!ec->comp_data || !ec->comp_data->sub.data)
return NULL;
- parent = cdata->sub.data->parent;
+ parent = ec->comp_data->sub.data->parent;
while (parent)
{
- parent_cdata = e_client_cdata_get(parent);
- if (!parent_cdata || !parent_cdata->sub.data)
+ if (!parent->comp_data || !parent->comp_data->sub.data)
return NULL;
- if (parent_cdata->sub.data->remote_surface.offscreen_parent)
- return parent_cdata->sub.data->remote_surface.offscreen_parent;
+ if (parent->comp_data->sub.data->remote_surface.offscreen_parent)
+ return parent->comp_data->sub.data->remote_surface.offscreen_parent;
- parent = parent_cdata->sub.data->parent;
+ parent = parent->comp_data->sub.data->parent;
}
return NULL;
_e_video_hwc_client_visible_get(E_Client *ec)
{
E_Client *offscreen_parent;
- E_Comp_Wl_Client_Data *cdata = NULL;
if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
return EINA_FALSE;
}
- cdata = e_client_cdata_get(ec);
- if (cdata->sub.data && cdata->sub.data->stand_alone)
+ if (ec->comp_data->sub.data && ec->comp_data->sub.data->stand_alone)
return EINA_TRUE;
offscreen_parent = _e_video_hwc_client_offscreen_parent_get(ec);
evh->input_buffer_list = eina_list_append(evh->input_buffer_list, vbuf);
e_comp_wl_video_buffer_free_func_add(vbuf, _e_video_hwc_input_buffer_cb_free, evh);
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(evh->ec);
DBG("Client(%s):PID(%d) RscID(%d), Buffer(%p) created",
e_client_util_name_get(evh->ec) ?: "No Name" , evh->ec->netwm.pid,
- wl_resource_get_id(cdata->surface), vbuf);
+ wl_resource_get_id(evh->ec->comp_data->surface), vbuf);
end:
vbuf->content_r = evh->geo.input_r;
return vbuf;
evh->input_buffer_list = eina_list_append(evh->input_buffer_list, vbuf);
e_comp_wl_video_buffer_free_func_add(vbuf, _e_video_hwc_input_buffer_cb_free, evh);
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(evh->ec);
DBG("Client(%s):PID(%d) RscID(%d), Buffer(%p) created",
e_client_util_name_get(evh->ec) ?: "No Name" , evh->ec->netwm.pid,
- wl_resource_get_id(cdata->surface), vbuf);
+ wl_resource_get_id(evh->ec->comp_data->surface), vbuf);
end:
vbuf->content_r = evh->geo.input_r;
return vbuf;
static Eina_Bool
_e_video_hwc_geometry_map_apply(E_Client *ec, E_Video_Hwc_Geometry *out)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
const Evas_Map *m;
Evas_Point p[4];
Eina_Rectangle output_r;
return EINA_FALSE;
}
- cdata = e_client_cdata_get(ec);
/* NOTE Merge transform value from evas_map with E_Comp_Wl_Buffer_Viewport's one.
* Since buffer.transform isn't applied using evas_map,
* it has to be taken into account here to apply buffer.transform
* and rotation of e_client_transform together. */
transform =
- _e_video_hwc_transform_merge_with_buffer_viewport(&cdata->scaler.buffer_viewport,
+ _e_video_hwc_transform_merge_with_buffer_viewport(&ec->comp_data->scaler.buffer_viewport,
transform);
if ((!memcmp(&out->output_r, &output_r, sizeof(Eina_Rectangle))) &&
static E_Comp_Wl_Subsurf_Data *
_e_video_hwc_client_subsurface_data_get(E_Client *ec)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
- if (cdata && cdata->sub.data)
- return cdata->sub.data;
+ if (ec->comp_data && ec->comp_data->sub.data)
+ return ec->comp_data->sub.data;
return NULL;
}
_e_video_hwc_geometry_output_rect_get(E_Client *ec, Eina_Rectangle *out)
{
E_Comp_Wl_Subsurf_Data *sdata;
- E_Comp_Wl_Client_Data *cdata = NULL;
sdata = _e_video_hwc_client_subsurface_data_get(ec);
if (sdata)
out->y = ec->y;
}
- cdata = e_client_cdata_get(ec);
- out->w = cdata->width_from_viewport;
+ out->w = ec->comp_data->width_from_viewport;
out->w = (out->w + 1) & ~1;
- out->h = cdata->height_from_viewport;
+ out->h = ec->comp_data->height_from_viewport;
e_comp_object_frame_xy_unadjust(ec->frame, out->x, out->y, &out->x, &out->y);
e_comp_object_frame_wh_unadjust(ec->frame, out->w, out->h, &out->w, &out->h);
static Eina_Bool
_e_video_hwc_geometry_viewport_apply(E_Client *ec, E_Video_Hwc_Geometry *out)
{
- E_Comp_Wl_Client_Data *cdata = NULL;
E_Comp_Wl_Buffer_Viewport *vp;
tbm_surface_h tbm_surf;
return EINA_FALSE;
}
- cdata = e_client_cdata_get(ec);
- vp = &cdata->scaler.buffer_viewport;
+ vp = &ec->comp_data->scaler.buffer_viewport;
_e_video_hwc_geometry_input_rect_get_with_viewport(tbm_surf, vp, &out->input_r);
_e_video_hwc_geometry_output_rect_get(ec, &out->output_r);
_e_video_hwc_child_client_get(E_Client *ec)
{
E_Client *subc = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL, *subc_cdata = NULL;
Eina_List *l;
-
if (!ec) return NULL;
if (e_object_is_del(E_OBJECT(ec))) return NULL;
- cdata = e_client_cdata_get(ec);
- if (!cdata) return NULL;
+ if (!ec->comp_data) return NULL;
if (e_client_video_hw_composition_check(ec)) return ec;
- EINA_LIST_FOREACH(cdata->sub.below_list, l, subc)
+ EINA_LIST_FOREACH(ec->comp_data->sub.below_list, l, subc)
{
E_Client *temp= NULL;
- subc_cdata = e_client_cdata_get(subc);
- if (!subc_cdata || e_object_is_del(E_OBJECT(subc))) continue;
+ if (!subc->comp_data || e_object_is_del(E_OBJECT(subc))) continue;
temp = _e_video_hwc_child_client_get(subc);
if(temp) return temp;
}
EINA_SAFETY_ON_NULL_RETURN_VAL(ev->ec, ECORE_CALLBACK_PASS_ON);
ec = ev->ec;
- if (!e_client_cdata_get(ec)) return ECORE_CALLBACK_PASS_ON;
+ if (!ec->comp_data) return ECORE_CALLBACK_PASS_ON;
video_ec = _e_video_hwc_child_client_get(ec);
if (!video_ec) return ECORE_CALLBACK_PASS_ON;
{
E_Video_Hwc *evh;
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata = NULL;
evh = data;
ec = evh->ec;
_e_video_hwc_render_queue(evh);
}
- cdata = e_client_cdata_get(ec);
/* if stand_alone is true, not show */
- if (cdata->sub.data && cdata->sub.data->stand_alone)
+ if (ec->comp_data->sub.data && ec->comp_data->sub.data->stand_alone)
return;
if (evh->current_fb)
static void
_e_video_hwc_client_event_init(E_Video_Hwc *evh)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(evh->ec);
-
/* In order to try to redraw video whenever viewport changes. */
evh->surface_viewport_listener.notify = _e_video_hwc_cb_surface_viewport;
- if (cdata)
+ if (evh->ec->comp_data)
{
- wl_signal_add(&cdata->apply_viewport_signal,
+ wl_signal_add(&evh->ec->comp_data->apply_viewport_signal,
&evh->surface_viewport_listener);
}
static void
_e_video_hwc_client_event_deinit(E_Video_Hwc *evh)
{
- E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(evh->ec);
-
- /* links for listener have to be removed only in case cdata is valid. */
- if (cdata)
+ /* links for listener have to be removed only in case comp_data is valid. */
+ if (evh->ec->comp_data)
wl_list_remove(&evh->surface_viewport_listener.link);
evas_object_event_callback_del_full(evh->ec->frame, EVAS_CALLBACK_SHOW,
e_video_hwc_client_mask_update(E_Video_Hwc *evh)
{
E_Client *topmost;
- E_Comp_Wl_Client_Data *topmost_cdata = NULL;
Eina_Bool punch = EINA_FALSE;
int bw, bh;
punch = EINA_TRUE;
else if ((topmost = e_comp_wl_topmost_parent_get(evh->ec)))
{
- topmost_cdata = e_client_cdata_get(topmost);
/* if it's laid above main surface */
- if (eina_list_data_find(topmost_cdata->sub.list, evh->ec))
+ if (eina_list_data_find(topmost->comp_data->sub.list, evh->ec))
punch = EINA_TRUE;
/* if it's laid under main surface and main surface is transparent */
else if (topmost->argb)
e_video_hwc_client_mask_update((E_Video_Hwc *)evhp);
- E_Comp_Wl_Client_Data *base_cdata = e_client_cdata_get(evhp->base.ec);
DBG("Client(%s):PID(%d) RscID(%d), Buffer(%p, refcnt:%d) is shown."
"Geometry details are : buffer size(%dx%d) src(%d,%d, %dx%d)"
" dst(%d,%d, %dx%d), transform(%d)",
e_client_util_name_get(evhp->base.ec) ?: "No Name" , evhp->base.ec->netwm.pid,
- wl_resource_get_id(base_cdata->surface), vbuf, vbuf->ref_cnt,
+ wl_resource_get_id(evhp->base.ec->comp_data->surface), vbuf, vbuf->ref_cnt,
info->src_config.size.h, info->src_config.size.v, info->src_config.pos.x,
info->src_config.pos.y, info->src_config.pos.w, info->src_config.pos.h,
info->dst_pos.x, info->dst_pos.y, info->dst_pos.w, info->dst_pos.h, info->transform);
_e_video_hwc_planes_cb_evas_hide(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
E_Video_Hwc_Planes *evhp = data;
- E_Comp_Wl_Client_Data *base_cdata = NULL;
if (e_object_is_del(E_OBJECT(evhp->base.ec))) return;
- base_cdata = e_client_cdata_get(evhp->base.ec);
- if (!base_cdata) return;
/* if stand_alone is true, not hide */
- if (base_cdata->sub.data && base_cdata->sub.data->stand_alone)
+ if (evhp->base.ec->comp_data->sub.data && evhp->base.ec->comp_data->sub.data->stand_alone)
return;
VIN("evas hide", evhp->base.ec);
* frame buffer. */
evhw->commit_data.wait_release = EINA_TRUE;
- E_Comp_Wl_Client_Data *base_ec_cdata = e_client_cdata_get(evhw->base.ec);
-
DBG("Client(%s):PID(%d) RscID(%d), Buffer(%p, refcnt:%d) is shown."
"Geometry details are : buffer size(%dx%d) src(%d,%d, %dx%d)"
" dst(%d,%d, %dx%d), transform(%d)",
e_client_util_name_get(evhw->base.ec) ?: "No Name" ,
evhw->base.ec->netwm.pid,
- wl_resource_get_id(base_ec_cdata->surface),
+ wl_resource_get_id(evhw->base.ec->comp_data->surface),
vbuf, vbuf->ref_cnt,
evhw->commit_data.info.src_config.size.h,
evhw->commit_data.info.src_config.size.v,