EINA_SAFETY_ON_NULL_RETURN(window);
- if ((x == 0) && (y == 0) && (w == 0) && (h == 0))
- {
- if (window->surface)
- wl_surface_set_opaque_region(window->surface, NULL);
- return;
- }
-
switch (window->rotation)
{
case 0:
window->opaque.y = ny;
window->opaque.w = nw;
window->opaque.h = nh;
- window->opaque_set = EINA_TRUE;
+ window->opaque_set = x || y || w || h;
if (!window->surface) return;
+ if (!window->opaque_set)
+ {
+ wl_surface_set_opaque_region(window->surface, NULL);
+ return;
+ }
+
region = wl_compositor_create_region(window->display->wl.compositor);
if (!region)
{