ec = ips->ec;
if (ec && (!e_object_is_del(E_OBJECT(ec))))
{
- if (ec->comp_data)
+ if (e_comp_wl_data_check(ec))
{
- if (ec->comp_data->mapped)
+ if (e_comp_wl_mapped_get(ec))
{
- if ((ec->comp_data->shell.surface) &&
- (ec->comp_data->shell.unmap))
- ec->comp_data->shell.unmap(ec->comp_data->shell.surface);
+ e_comp_wl_shell_unmap(ec);
}
if (ec->parent)
{
ec->parent->transients =
eina_list_remove(ec->parent->transients, ec);
}
- ec->comp_data->shell.surface = NULL;
+ e_comp_wl_shell_surface_set(ec, NULL);
}
}
return;
}
- if (!ec->comp_data)
+ if (!e_comp_wl_data_check(ec))
{
WTI_WARNING(resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
}
/* NOTE: we need to set mapped, so that avoid showing evas_object and continue buffer's commit process. */
- if ((!ec->comp_data->mapped) && (e_pixmap_usable_get(ec->pixmap)))
+ if ((!e_comp_wl_mapped_get(ec)) && (e_pixmap_usable_get(ec->pixmap)))
{
- ec->comp_data->mapped = EINA_TRUE;
+ e_comp_wl_mapped_set(ec, EINA_TRUE);
ec->first_mapped = EINA_TRUE;
}
ec = ips->ec;
CHECK_ECLIENT(ec, resource);
- if (!ec->comp_data)
+ if (!e_comp_wl_data_check(ec))
{
WTI_WARNING(resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
if (e_object_is_del(E_OBJECT(ec))) return;
- if (ec->comp_data->mapped)
+ if (e_comp_wl_mapped_get(ec))
{
e_client_visible_set(ec, EINA_FALSE);
e_view_client_hide(e_client_view_get(ec));
- ec->comp_data->mapped = EINA_FALSE;
+ e_comp_wl_mapped_set(ec, EINA_FALSE);
}
}
E_Input_Panel *input_panel = wl_resource_get_user_data(resource);
E_Client *ec = e_client_from_surface_resource(surface_resource);
E_Input_Panel_Surface *ips = NULL;
- E_Comp_Wl_Client_Data *cdata = NULL;
+ struct wl_resource *shell_surface;
LOGI("client %p input_panel %p ec %p resource %p surface_resource %p",
client, input_panel, ec, resource, surface_resource);
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL)
return;
- if (!(cdata = ec->comp_data))
+ if (!e_comp_wl_data_check(ec))
{
WTI_WARNING(surface_resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
}
/* check for existing shell surface */
- if (cdata->shell.surface)
+ if (e_comp_wl_shell_surface_get(ec))
{
WTI_WARNING(surface_resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
return;
}
- if (!(cdata->shell.surface =
+ if (!(shell_surface =
wl_resource_create(client, &zwp_input_panel_surface_v1_interface, 1, id)))
{
wl_resource_post_no_memory(surface_resource);
/* NOTE: Cleanup E_client. */
return;
}
+ e_comp_wl_shell_surface_set(ec, shell_surface);
if (ec->ignored)
e_client_unignore(ec);
evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_MOUSE_DOWN, _e_ips_cb_mouse_down, ec);
evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_MOUSE_MOVE, _e_ips_cb_mouse_move, ec);
- cdata->shell.configure_send = NULL;
- cdata->shell.configure = _e_input_panel_surface_configure;
- cdata->shell.ping = NULL;
- cdata->shell.map = _e_input_panel_surface_map;
- cdata->shell.unmap = _e_input_panel_surface_unmap;
+ E_Comp_Wl_Shell_Surface_Api api = {
+ .configure_send = NULL,
+ .configure = _e_input_panel_surface_configure,
+ .ping = NULL,
+ .map = _e_input_panel_surface_map,
+ .unmap = _e_input_panel_surface_unmap,
+ };
+ e_comp_wl_shell_surface_api_set(ec, &api);
if (!(ips = E_NEW(E_Input_Panel_Surface, 1)))
{
_e_input_panel_surface_append(input_panel, ips, resource);
- wl_resource_set_implementation(cdata->shell.surface,
+ wl_resource_set_implementation(shell_surface,
&_e_input_panel_surface_implementation,
ips, _e_input_panel_surface_resource_destroy);
if (ips && ips->resource == resource)
{
E_Client *ec;
- E_Comp_Wl_Client_Data *cdata;
input_panel->surfaces = eina_list_remove_list(input_panel->surfaces, l);
LOGI("Removed surface %p from list %p", l, input_panel->surfaces);
if (!(ec = ips->ec)) continue;
if (e_object_is_del(E_OBJECT(ec))) continue;
- if (!(cdata = ec->comp_data)) continue;
+ if (!e_comp_wl_data_check(ec)) continue;
- cdata->shell.surface = NULL;
+ e_comp_wl_shell_surface_set(ec, NULL);
}
}
}
if (ec_parent)
{
if (!e_object_is_del(E_OBJECT(ec_parent)) &&
- (ec_parent->comp_data) && (ec_parent->comp_data->remote_surface.onscreen_parent))
+ e_comp_wl_remote_surface_onscreen_parent_get(ec_parent))
{
- ec_parent = ec_parent->comp_data->remote_surface.onscreen_parent;
+ ec_parent = e_comp_wl_remote_surface_onscreen_parent_get(ec_parent);
}
}