/* get the client for this resource */
if ((ec = wl_resource_get_user_data(resource)))
{
- if (ec->comp_data)
+ if (ec->wl_comp_data)
{
- if (ec->comp_data->mapped)
+ if (ec->wl_comp_data->mapped)
{
- if ((ec->comp_data->shell.surface) &&
- (ec->comp_data->shell.unmap))
- ec->comp_data->shell.unmap(ec->comp_data->shell.surface);
+ if ((ec->wl_comp_data->shell.surface) &&
+ (ec->wl_comp_data->shell.unmap))
+ ec->wl_comp_data->shell.unmap(ec->wl_comp_data->shell.surface);
}
- ec->comp_data->shell.surface = NULL;
+ ec->wl_comp_data->shell.surface = NULL;
}
}
}
ec->border.changed = ec->changes.border = !ec->borderless;
ec->changes.icon = !!ec->icccm.class;
ec->netwm.type = E_WINDOW_TYPE_NORMAL;
- ec->comp_data->set_win_type = EINA_FALSE;
+ ec->wl_comp_data->set_win_type = EINA_FALSE;
EC_CHANGED(ec);
}
return;
}
- serial = wl_display_next_serial(ec->comp->comp_data->wl.disp);
- wl_shell_surface_send_ping(ec->comp_data->shell.surface, serial);
+ serial = wl_display_next_serial(ec->comp->wl_comp_data->wl.disp);
+ wl_shell_surface_send_ping(ec->wl_comp_data->shell.surface, serial);
}
static void
}
/* map this surface if needed */
- if ((!ec->comp_data->mapped) && (e_pixmap_usable_get(ec->pixmap)))
+ if ((!ec->wl_comp_data->mapped) && (e_pixmap_usable_get(ec->pixmap)))
{
ec->visible = EINA_TRUE;
evas_object_show(ec->frame);
evas_object_geometry_set(ec->frame, ec->x, ec->y, ec->w, ec->h);
- ec->comp_data->mapped = EINA_TRUE;
+ ec->wl_comp_data->mapped = EINA_TRUE;
}
}
return;
}
- if (ec->comp_data->mapped)
+ if (ec->wl_comp_data->mapped)
{
ec->visible = EINA_FALSE;
evas_object_hide(ec->frame);
- ec->comp_data->mapped = EINA_FALSE;
+ ec->wl_comp_data->mapped = EINA_FALSE;
}
}
{
E_Pixmap *ep;
E_Client *ec;
- E_Comp_Client_Data *cdata;
+ E_Comp_Wl_Client_Data *cdata;
/* get the pixmap from this surface so we can find the client */
if (!(ep = wl_resource_get_user_data(surface_resource)))
}
/* get the client data */
- if (!(cdata = ec->comp_data))
+ if (!(cdata = ec->wl_comp_data))
{
wl_resource_post_error(surface_resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
{
E_Client *ec;
- DBG("XDG_SHELL: Surface Destroy");
+ /* DBG("XDG_SHELL: Surface Destroy"); */
if ((ec = wl_resource_get_user_data(resource)))
{
/* eina_stringshare_del(ec->icccm.title); */
/* eina_stringshare_del(ec->icccm.class); */
- ec->comp_data->shell.surface = NULL;
+ ec->wl_comp_data->shell.surface = NULL;
}
}
static void
-_e_xdg_shell_surface_cb_transient_for_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *parent_resource EINA_UNUSED)
+_e_xdg_shell_surface_cb_transient_for_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, struct wl_resource *parent_resource EINA_UNUSED)
{
/* E_Client *ec; */
- DBG("XDG_SHELL: Transient For Set: %d", wl_resource_get_id(resource));
+ /* DBG("XDG_SHELL: Transient For Set: %d", wl_resource_get_id(resource)); */
/* if (parent_resource) */
/* DBG("\tParent Resource: %d", wl_resource_get_id(parent_resource)); */
}
static void
-_e_xdg_shell_surface_cb_margin_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, int32_t l, int32_t r, int32_t t, int32_t b)
+_e_xdg_shell_surface_cb_margin_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, int32_t l, int32_t r, int32_t t, int32_t b)
{
+ /* E_Client *ec; */
+ /* int32_t diff; */
+
DBG("XDG_SHELL: Margin Set: %d %d %d %d", l, t, r, b);
+
+ /* get the client for this resource */
+ /* if (!(ec = wl_resource_get_user_data(resource))) */
+ /* { */
+ /* wl_resource_post_error(resource, */
+ /* WL_DISPLAY_ERROR_INVALID_OBJECT, */
+ /* "No Client For Shell Surface"); */
+ /* return; */
+ /* } */
+
+ /* if (!ec->wl_comp_data) return; */
+ /* if (eina_rectangle_is_empty(ec->wl_comp_data->opaque)) return; */
+
+ /* diff = (ec->wl_comp_data->opaque->x - l); */
+
+ /* ec->wl_comp_data->opaque->x = l; */
+ /* ec->wl_comp_data->opaque->y = t; */
+
+ /* ec->wl_comp_data->opaque->w = ec->wl_comp_data->opaque->w + (diff * 2); */
+ /* ec->wl_comp_data->opaque->h = ec->wl_comp_data->opaque->h + (diff * 2); */
+
+ /* EINA_RECTANGLE_SET(ec->wl_comp_data->opaque, */
+ /* l, t, pw, ph); */
}
static void
_e_xdg_shell_surface_cb_move(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *seat_resource, uint32_t serial EINA_UNUSED)
{
E_Client *ec;
- E_Comp_Data *cdata;
+ E_Comp_Wl_Data *cdata;
E_Binding_Event_Mouse_Button ev;
/* get the client for this resource */
_e_xdg_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *seat_resource, uint32_t serial EINA_UNUSED, uint32_t edges)
{
E_Client *ec;
- E_Comp_Data *cdata;
+ E_Comp_Wl_Data *cdata;
E_Binding_Event_Mouse_Button ev;
/* DBG("XDG_SHELL: Surface Resize"); */
return;
}
- xdg_surface_send_state_change(ec->comp_data->shell.surface,
+ xdg_surface_send_state_change(ec->wl_comp_data->shell.surface,
state, value, serial);
}
return;
}
- xdg_surface_send_configure(ec->comp_data->shell.surface,
+ xdg_surface_send_configure(ec->wl_comp_data->shell.surface,
ec->client.w, ec->client.h);
}
{
E_Client *ec;
- /* DBG("XDG_SHELL: Surface Configure: %d \t%d %d %d %d", */
- /* wl_resource_get_id(resource), x, y, w, h); */
+ DBG("XDG_SHELL: Surface Configure: %d \t%d %d %d %d",
+ wl_resource_get_id(resource), x, y, w, h);
/* get the client for this resource */
if (!(ec = wl_resource_get_user_data(resource)))
if ((ec->netwm.type == E_WINDOW_TYPE_POPUP_MENU) && (ec->parent))
{
- x = ec->parent->client.x + ec->comp_data->popup.x;
- y = ec->parent->client.y + ec->comp_data->popup.y;
+ x = ec->parent->client.x + ec->wl_comp_data->popup.x;
+ y = ec->parent->client.y + ec->wl_comp_data->popup.y;
}
// if ((ec->client.x != x) || (ec->client.y != y))
return;
}
- serial = wl_display_next_serial(ec->comp->comp_data->wl.disp);
+ serial = wl_display_next_serial(ec->comp->wl_comp_data->wl.disp);
- if (ec->comp->comp_data->shell_interface.xdg_shell)
- xdg_shell_send_ping(ec->comp->comp_data->shell_interface.xdg_shell, serial);
+ if (ec->comp->wl_comp_data->shell_interface.xdg_shell)
+ xdg_shell_send_ping(ec->comp->wl_comp_data->shell_interface.xdg_shell, serial);
}
static void
}
if (ec->netwm.type != E_WINDOW_TYPE_POPUP_MENU)
- xdg_surface_send_activated(ec->comp_data->shell.surface);
+ xdg_surface_send_activated(ec->wl_comp_data->shell.surface);
}
static void
/* DBG("\tSend XDG Deactivate"); */
if (ec->netwm.type != E_WINDOW_TYPE_POPUP_MENU)
- xdg_surface_send_deactivated(ec->comp_data->shell.surface);
+ xdg_surface_send_deactivated(ec->wl_comp_data->shell.surface);
}
static void
{
E_Client *ec;
- /* DBG("XDG_SHELL: Map Surface: %d", wl_resource_get_id(resource)); */
+ DBG("XDG_SHELL: Map Surface: %d", wl_resource_get_id(resource));
/* get the client for this resource */
if (!(ec = wl_resource_get_user_data(resource)))
return;
}
- if ((!ec->comp_data->mapped) && (e_pixmap_usable_get(ec->pixmap)))
+ if ((!ec->wl_comp_data->mapped) && (e_pixmap_usable_get(ec->pixmap)))
{
/* map this surface if needed */
ec->visible = EINA_TRUE;
evas_object_show(ec->frame);
evas_object_geometry_set(ec->frame, ec->x, ec->y, ec->w, ec->h);
- ec->comp_data->mapped = EINA_TRUE;
+ ec->wl_comp_data->mapped = EINA_TRUE;
/* FIXME: sometimes popup surfaces Do Not raise above their
* respective parents... */
return;
}
- if (ec->comp_data->mapped)
+ if (ec->wl_comp_data->mapped)
{
ec->visible = EINA_FALSE;
evas_object_hide(ec->frame);
- ec->comp_data->mapped = EINA_FALSE;
+ ec->wl_comp_data->mapped = EINA_FALSE;
}
}
{
E_Pixmap *ep;
E_Client *ec;
- E_Comp_Client_Data *cdata;
+ E_Comp_Wl_Client_Data *cdata;
/* DBG("XDG_SHELL: Surface Get %d", wl_resource_get_id(surface_resource)); */
}
/* get the client data */
- if (!(cdata = ec->comp_data))
+ if (!(cdata = ec->wl_comp_data))
{
wl_resource_post_error(surface_resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
ec->border.changed = ec->changes.border = !ec->borderless;
ec->changes.icon = !!ec->icccm.class;
ec->netwm.type = E_WINDOW_TYPE_NORMAL;
- ec->comp_data->set_win_type = EINA_FALSE;
+ ec->wl_comp_data->set_win_type = EINA_FALSE;
EC_CHANGED(ec);
}
/* DBG("XDG_SHELL: Popup Destroy"); */
if ((ec = wl_resource_get_user_data(resource)))
{
- if (ec->comp_data)
+ if (ec->wl_comp_data)
{
- if (ec->comp_data->mapped)
+ if (ec->wl_comp_data->mapped)
{
- if ((ec->comp_data->shell.surface) &&
- (ec->comp_data->shell.unmap))
- ec->comp_data->shell.unmap(ec->comp_data->shell.surface);
+ if ((ec->wl_comp_data->shell.surface) &&
+ (ec->wl_comp_data->shell.unmap))
+ ec->wl_comp_data->shell.unmap(ec->wl_comp_data->shell.surface);
}
if (ec->parent)
eina_list_remove(ec->parent->transients, ec);
}
- ec->comp_data->shell.surface = NULL;
+ ec->wl_comp_data->shell.surface = NULL;
}
}
}
{
E_Pixmap *ep;
E_Client *ec;
- E_Comp_Client_Data *cdata;
+ E_Comp_Wl_Client_Data *cdata;
/* DBG("XDG_SHELL: Popup Get"); */
/* DBG("\tSurface: %d", wl_resource_get_id(surface_resource)); */
}
/* get the client data */
- if (!(cdata = ec->comp_data))
+ if (!(cdata = ec->wl_comp_data))
{
wl_resource_post_error(surface_resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
ec->border.changed = ec->changes.border = !ec->borderless;
ec->changes.icon = !!ec->icccm.class;
ec->netwm.type = E_WINDOW_TYPE_POPUP_MENU;
- ec->comp_data->set_win_type = EINA_FALSE;
+ ec->wl_comp_data->set_win_type = EINA_FALSE;
ec->layer = E_LAYER_CLIENT_POPUP;
EC_CHANGED(ec);
static void
_e_xdg_shell_cb_unbind(struct wl_resource *resource)
{
- E_Comp_Data *cdata;
+ E_Comp_Wl_Data *cdata;
if (!(cdata = wl_resource_get_user_data(resource))) return;
static int
_e_xdg_shell_cb_dispatch(const void *implementation EINA_UNUSED, void *target, uint32_t opcode, const struct wl_message *message EINA_UNUSED, union wl_argument *args)
{
- E_Comp_Data *cdata;
+ E_Comp_Wl_Data *cdata;
struct wl_resource *res;
if (!(res = target)) return 0;
static void
_e_shell_cb_unbind(struct wl_resource *resource)
{
- E_Comp_Data *cdata;
+ E_Comp_Wl_Data *cdata;
if (!(cdata = wl_resource_get_user_data(resource))) return;
static void
_e_shell_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id)
{
- E_Comp_Data *cdata;
+ E_Comp_Wl_Data *cdata;
struct wl_resource *res;
if (!(cdata = data))
static void
_e_xdg_shell_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id)
{
- E_Comp_Data *cdata;
+ E_Comp_Wl_Data *cdata;
struct wl_resource *res;
if (!(cdata = data))
e_modapi_init(E_Module *m)
{
E_Comp *comp;
- E_Comp_Data *cdata;
+ E_Comp_Wl_Data *cdata;
/* try to get the current compositor */
if (!(comp = e_comp_get(NULL))) return NULL;
/* make sure it's a wayland compositor */
- if (comp->comp_type != E_PIXMAP_TYPE_WL) return NULL;
+ /* if (comp->comp_type != E_PIXMAP_TYPE_WL) return NULL; */
/* try to get the compositor data */
- if (!(cdata = comp->comp_data)) return NULL;
+ if (!(cdata = comp->wl_comp_data)) return NULL;
/* try to create global shell interface */
if (!wl_global_create(cdata->wl.disp, &wl_shell_interface, 1,