static Eina_Bool
_e_client_shsurface_assignable_check(E_Client *ec)
{
+ E_Comp_Wl_Client_Data *cdata;
+
if (!e_shell_e_client_shell_assignable_check(ec))
{
ERR("Could not assign shell", ec);
- wl_resource_post_error(ec->comp_data->surface,
+ cdata = e_client_cdata_get(ec);
+ wl_resource_post_error(cdata->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)
{
- return !!ec->comp_data->sh_v6.res_role;
+ E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
+ return !!cdata->sh_v6.res_role;
}
static void
struct wl_resource *resource,
E_Comp_Wl_Sh_Surf_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;
+ E_Comp_Wl_Client_Data *cdata;
+
+ 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;
}
static void
_e_client_xdg_shell_v6_role_assingment_unset(E_Client *ec)
{
- if ((!ec) || (!ec->comp_data) || (e_object_is_del(E_OBJECT(ec))))
- return;
+ E_Comp_Wl_Client_Data *cdata;
+
+ if (!ec) return;
+ if (e_object_is_del(E_OBJECT(ec))) return;
+ cdata = e_client_cdata_get(ec);
+ if (!cdata) 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;
+
popup->parent = parent;
+ parent_cdata = e_client_cdata_get(parent->ec);
+
/* set this client as a transient for parent */
- e_shell_e_client_parent_set(popup->base.ec, parent->ec->comp_data->surface);
+ e_shell_e_client_parent_set(popup->base.ec, parent_cdata->surface);
}
static void
_e_xdg_toplevel_committed(E_Xdg_Toplevel *toplevel)
{
E_Client *ec;
+ E_Comp_Wl_Client_Data *cdata;
int pw, ph;
ec = toplevel->base.ec;
return;
}
- if (!ec->comp_data)
+ cdata = e_client_cdata_get(ec);
+ if (!cdata)
{
- ERR("E_Client must have E_Comp_Client_Data", ec);
+ ERR("E_Client must have E_Comp_Wl_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 != ec->comp_data->shell.window.w ||
- toplevel->next.size.h != ec->comp_data->shell.window.h ||
+ (toplevel->next.size.w != cdata->shell.window.w ||
+ toplevel->next.size.h != cdata->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,
- ec->comp_data->shell.window.w, ec->comp_data->shell.window.h,
+ cdata->shell.window.w, cdata->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;
struct wl_resource *parent_wsurface = NULL;
toplevel = wl_resource_get_user_data(resource);
return;
}
- if (!pc->comp_data) return;
+ pc_cdata = e_client_cdata_get(pc);
+ if (!pc_cdata) return;
- parent_wsurface = pc->comp_data->surface;
+ parent_wsurface = pc_cdata->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(exsurf->ec->comp_data, end);
+ EINA_SAFETY_ON_NULL_GOTO(e_client_cdata_get(exsurf->ec), 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;
- EINA_RECTANGLE_SET(&exsurf->ec->comp_data->shell.window,
+ exsurf_cdata = e_client_cdata_get(exsurf->ec);
+ EINA_RECTANGLE_SET(&exsurf_cdata->shell.window,
exsurf->window_geometry.x,
exsurf->window_geometry.y,
exsurf->window_geometry.w,