diff --git a/src/bin/e_zone.c b/src/bin/e_zone.c index 2d02fd2e8..6c4682278 100644 --- a/src/bin/e_zone.c +++ b/src/bin/e_zone.c @@ -1239,7 +1239,10 @@ _e_zone_useful_geometry_calc(const E_Zone *zone, int dx, int dy, int *x, int *y, EINA_INLIST_FOREACH(zone->obstacles, obs) { if (!E_INTERSECTS(obs->x, obs->y, obs->w, obs->h, zx, zy, zw, zh)) continue; - eina_tiler_rect_del(tiler, &(Eina_Rectangle){obs->x - zx, obs->y - zy, obs->w, obs->h}); + if (obs->w >= obs->h) + eina_tiler_rect_del(tiler, &(Eina_Rectangle){0, obs->y - zy, zw, obs->h}); + else + eina_tiler_rect_del(tiler, &(Eina_Rectangle){obs->x - zx, 0, obs->w, zh}); } desk = e_desk_at_xy_get(zone, dx, dy); if (desk) @@ -1247,7 +1250,10 @@ _e_zone_useful_geometry_calc(const E_Zone *zone, int dx, int dy, int *x, int *y, EINA_INLIST_FOREACH(desk->obstacles, obs) { if (!E_INTERSECTS(obs->x, obs->y, obs->w, obs->h, zx, zy, zw, zh)) continue; - eina_tiler_rect_del(tiler, &(Eina_Rectangle){obs->x - zx, obs->y - zy, obs->w, obs->h}); + if (obs->w >= obs->h) + eina_tiler_rect_del(tiler, &(Eina_Rectangle){0, obs->y - zy, zw, obs->h}); + else + eina_tiler_rect_del(tiler, &(Eina_Rectangle){obs->x - zx, 0, obs->w, zh}); } } it = eina_tiler_iterator_new(tiler);