discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=297dbc6bdf93c91d8ae1737f7777c1ed66b81d8f
commit 297dbc6bdf93c91d8ae1737f7777c1ed66b81d8f Author: Mike Blumenkrantz <zm...@osg.samsung.com> Date: Thu Jan 14 16:16:57 2016 -0500 use zone obstacles when generating list of obstacles in smart place this should also fix an issue where shelves on other screens were not blocking window placement in some cases --- src/bin/e_place.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/bin/e_place.c b/src/bin/e_place.c index 8d98972..1bab7cf 100644 --- a/src/bin/e_place.c +++ b/src/bin/e_place.c @@ -233,20 +233,28 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART) { - Eina_List *l; - E_Shelf *es; + E_Zone_Obstacle *obs; - l = e_shelf_list_all(); - EINA_LIST_FREE(l, es) + EINA_INLIST_FOREACH(desk->obstacles, obs) { int bx, by, bw, bh; - if (!e_shelf_desk_visible(es, desk)) continue; + bx = obs->x - desk->zone->x; + by = obs->y - desk->zone->y; + bw = obs->w; + bh = obs->h; + if (E_INTERSECTS(bx, by, bw, bh, 0, 0, zw, zh)) + _e_place_desk_region_smart_obstacle_add(u_x, u_y, &a_x, &a_y, + &a_w, &a_h, &a_alloc_w, &a_alloc_h, zw, zh, bx, by, bw, bh); + } + EINA_INLIST_FOREACH(desk->zone->obstacles, obs) + { + int bx, by, bw, bh; - bx = es->x; - by = es->y; - bw = es->w; - bh = es->h; + bx = obs->x - desk->zone->x; + by = obs->y - desk->zone->y; + bw = obs->w; + bh = obs->h; if (E_INTERSECTS(bx, by, bw, bh, 0, 0, zw, zh)) _e_place_desk_region_smart_obstacle_add(u_x, u_y, &a_x, &a_y, &a_w, &a_h, &a_alloc_w, &a_alloc_h, zw, zh, bx, by, bw, bh); --