client size is not set by the time opacity is set so it's necessary to store the full rect
Eina_Rectangle *rect;
Eina_List *ll;
Evas_Object *o;
- int w, h, t, b, l, r;
+ int w, h, bx, by, bxx, byy;
Eina_Bool dirty, visible;
API_ENTRY;
evas_object_image_data_set(cw->obj, NULL);
evas_object_image_size_set(cw->obj, w, h);
- e_pixmap_image_border_get(cw->ec->pixmap, &l, &r, &t, &b);
- evas_object_image_border_set(cw->obj, l, r, t, b);
+ e_pixmap_image_opaque_get(cw->ec->pixmap, &bx, &by, &bxx, &byy);
+ if (bxx && byy)
+ bxx = cw->ec->client.w - (bx + bxx), byy = cw->ec->client.h - (by + byy);
+ else
+ bx = by = bxx = byy = 0;
+ evas_object_image_border_set(cw->obj, bx, by, bxx, byy);
RENDER_DEBUG("SIZE [%p]: %dx%d", cw->ec, w, h);
if (cw->pending_updates)
eina_tiler_area_size_set(cw->pending_updates, w, h);
EINA_LIST_FOREACH(cw->obj_mirror, ll, o)
{
- evas_object_image_border_set(o, l, r, t, b);
+ evas_object_image_border_set(o, bx, by, bxx, byy);
evas_object_image_pixels_dirty_set(o, dirty);
if (!dirty)
evas_object_image_data_set(o, NULL);
it = eina_tiler_iterator_new(tmp);
EINA_ITERATOR_FOREACH(it, rect)
{
- e_pixmap_image_border_set(ec->pixmap, rect->x, ec->client.w - rect->x,
- rect->y, ec->client.h - rect->y);
+ e_pixmap_image_opaque_set(ec->pixmap, rect->x, rect->y, rect->w, rect->h);
break;
}
eina_iterator_free(it);
}
else
- e_pixmap_image_border_set(ec->pixmap, 0, 0, 0, 0);
+ e_pixmap_image_opaque_set(ec->pixmap, 0, 0, 0, 0);
}
static void
#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
struct wl_resource *resource;
Eina_List *resource_cache;
- Eina_Rectangle border;
+ Eina_Rectangle opaque;
#endif
Eina_Bool usable : 1;
}
EAPI void
-e_pixmap_image_border_set(E_Pixmap *cp, int l, int r, int t, int b)
+e_pixmap_image_opaque_set(E_Pixmap *cp, int x, int y, int w, int h)
{
EINA_SAFETY_ON_NULL_RETURN(cp);
#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
- EINA_RECTANGLE_SET(&cp->border, t, b, l, r);
+ EINA_RECTANGLE_SET(&cp->opaque, x, y, w, h);
#else
(void)l;
(void)r;
}
EAPI void
-e_pixmap_image_border_get(E_Pixmap *cp, int *l, int *r, int *t, int *b)
+e_pixmap_image_opaque_get(E_Pixmap *cp, int *x, int *y, int *w, int *h)
{
EINA_SAFETY_ON_NULL_RETURN(cp);
#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
- if (t) *t = cp->border.x;
- if (b) *b = cp->border.y;
- if (l) *l = cp->border.w;
- if (r) *r = cp->border.h;
+ if (x) *x = cp->opaque.x;
+ if (y) *y = cp->opaque.y;
+ if (w) *w = cp->opaque.w;
+ if (h) *h = cp->opaque.h;
#else
- if (t) *t = 0;
- if (b) *b = 0;
- if (l) *l = 0;
- if (r) *r = 0;
+ if (x) *x = 0;
+ if (y) *y = 0;
+ if (w) *w = 0;
+ if (h) *h = 0;
#endif
}
EAPI Eina_Bool e_pixmap_image_data_argb_convert(E_Pixmap *cp, void *pix, void *ipix, Eina_Rectangle *r, int stride);
EAPI Eina_Bool e_pixmap_image_draw(E_Pixmap *cp, const Eina_Rectangle *r);
-EAPI void e_pixmap_image_border_set(E_Pixmap *cp, int l, int r, int t, int b);
-EAPI void e_pixmap_image_border_get(E_Pixmap *cp, int *l, int *r, int *t, int *b);
+EAPI void e_pixmap_image_opaque_set(E_Pixmap *cp, int x, int y, int w, int h);
+EAPI void e_pixmap_image_opaque_get(E_Pixmap *cp, int *x, int *y, int *w, int *h);
static inline Eina_Bool
e_pixmap_is_x(const E_Pixmap *cp)