E_Comp_Wl_Buffer *buffer;
struct wl_resource *cb;
Eina_List *l, *ll;
- E_Comp_Wl_Buffer_Viewport *vp = &ec->comp_data->scaler.buffer_viewport;
+ E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
+ E_Comp_Wl_Buffer_Viewport *vp = &cdata->scaler.buffer_viewport;
if (ec->ignored)
{
if ((ec->internal) ||
- (ec->comp_data->shell.surface && state->new_attach))
+ (cdata->shell.surface && state->new_attach))
{
EC_CHANGED(ec);
ec->new_client = 1;
}
}
+ /* buffer transform */
if (vp->buffer.transform != state->buffer_viewport.buffer.transform)
{
E_Output *eout;
}
}
- ec->comp_data->scaler.buffer_viewport = state->buffer_viewport;
+ /* assign a new buffer_vieport to cdata->scaler.buffer_viewport */
+ cdata->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(&ec->comp_data->apply_viewport_signal,
- &ec->comp_data->surface);
+ wl_signal_emit(&cdata->apply_viewport_signal, &cdata->surface);
_e_comp_wl_surface_state_buffer_set(state, NULL);
_e_comp_wl_surface_state_size_update(ec, state);
e_comp_wl_map_size_cal_from_viewport(ec);
+ /* update the position */
if (ec->changes.pos)
{
e_comp_object_frame_xy_unadjust(ec->frame,
if (!e_pixmap_usable_get(ec->pixmap))
{
/* unmap ec */
- if (ec->comp_data->mapped)
+ if (cdata->mapped)
{
- if ((ec->comp_data->shell.surface) &&
- (ec->comp_data->shell.unmap))
+ if ((cdata->shell.surface) &&
+ (cdata->shell.unmap))
{
ELOGF("COMP", "Try to unmap. Call shell.unmap.", ec);
if (ec->show_pending.count > 0)
}
ec->show_pending.running = EINA_FALSE;
}
- ec->comp_data->shell.unmap(ec->comp_data->shell.surface);
+ cdata->shell.unmap(cdata->shell.surface);
}
else if ((ec->internal) ||
- (ec->comp_data->sub.data) ||
+ (cdata->sub.data) ||
(ec == e_comp_wl->drag_client))
{
ELOGF("COMP", "Try to unmap. Hide window. internal:%d, sub:%p, drag:%d",
- ec, ec->internal, ec->comp_data->sub.data, (ec == e_comp_wl->drag_client));
+ ec, ec->internal, cdata->sub.data, (ec == e_comp_wl->drag_client));
ec->visible = EINA_FALSE;
evas_object_hide(ec->frame);
- ec->comp_data->mapped = 0;
+ cdata->mapped = 0;
}
}
- if ((ec->comp_data->sub.below_obj) &&
- (evas_object_visible_get(ec->comp_data->sub.below_obj)))
+ if ((cdata->sub.below_obj) &&
+ (evas_object_visible_get(cdata->sub.below_obj)))
{
- evas_object_hide(ec->comp_data->sub.below_obj);
+ evas_object_hide(cdata->sub.below_obj);
}
}
else
{
/* map ec */
- if (!ec->comp_data->mapped)
+ if (!cdata->mapped)
{
- if ((ec->comp_data->shell.surface) &&
- (ec->comp_data->shell.map) &&
+ if ((cdata->shell.surface) &&
+ (cdata->shell.map) &&
(!ec->ignored))
{
ELOGF("COMP", "Try to map. Call shell.map.", ec);
- ec->comp_data->shell.map(ec->comp_data->shell.surface);
+ cdata->shell.map(cdata->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);
- ec->comp_data->mapped = 1;
+ cdata->mapped = 1;
}
}
- if ((ec->comp_data->sub.below_obj) &&
- (!evas_object_visible_get(ec->comp_data->sub.below_obj)) &&
+ if ((cdata->sub.below_obj) &&
+ (!evas_object_visible_get(cdata->sub.below_obj)) &&
(evas_object_visible_get(ec->frame)))
{
- evas_object_show(ec->comp_data->sub.below_obj);
+ evas_object_show(cdata->sub.below_obj);
}
}
if ((state->new_attach) ||
(state->buffer_viewport.changed))
{
- if ((ec->comp_data->shell.surface) &&
- (ec->comp_data->shell.configure))
+ if ((cdata->shell.surface) &&
+ (cdata->shell.configure))
{
e_comp_wl_commit_sync_configure(ec);
}
}
}
- if (ec->comp_data->scaler.buffer_viewport.changed)
+ if (cdata->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(ec->comp_data->frames, l, ll, cb)
+ 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);
/* insert state frame callbacks into comp_data->frames
* NB: This clears state->frames list */
- ec->comp_data->frames = eina_list_merge(ec->comp_data->frames,
+ cdata->frames = eina_list_merge(cdata->frames,
state->frames);
state->frames = NULL;
- e_presentation_time_container_feedback_discard(&ec->comp_data->presentation_container);
- e_presentation_time_container_feedback_merge(&ec->comp_data->presentation_container,
+ e_presentation_time_container_feedback_discard(&cdata->presentation_container);
+ e_presentation_time_container_feedback_merge(&cdata->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 ((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)))
+ 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)))
{
e_comp_object_damage(ec->frame,
0, 0,
- ec->comp_data->buffer_ref.buffer->w,
- ec->comp_data->buffer_ref.buffer->h);
+ cdata->buffer_ref.buffer->w,
+ cdata->buffer_ref.buffer->h);
}
}
else
e_comp_wl_subsurface_check_below_bg_rectangle(ec);
- if ((ec->comp_data->video_client) &&
+ if ((cdata->video_client) &&
((buffer) &&
(buffer->type == E_COMP_WL_BUFFER_TYPE_VIDEO)) &&
(e_comp->wl_comp_data->available_hw_accel.underlay))