discomfitor pushed a commit to branch enlightenment-0.21. http://git.enlightenment.org/core/enlightenment.git/commit/?id=99a9312b520066aa88e0ce2a92ed95d9ee90448b
commit 99a9312b520066aa88e0ce2a92ed95d9ee90448b Author: Mike Blumenkrantz <zm...@osg.samsung.com> Date: Mon Nov 7 12:27:34 2016 -0500 clamp e_place calcs to zone geometry fixes some cases where windows would place wrong due to placement code checking offscreen coords --- src/bin/e_place.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bin/e_place.c b/src/bin/e_place.c index 642a603..3a25bdc 100644 --- a/src/bin/e_place.c +++ b/src/bin/e_place.c @@ -339,8 +339,8 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w { for (i = 0; i < a_w - 1; i++) { - if ((a_x[i] <= zx + (zw - w)) && - (a_y[j] <= zy + (zh - h))) + if ((a_x[i] <= MAX(zx, zx + (zw - w))) && + (a_y[j] <= MAX(zy, zy + (zh - h)))) { int ar = 0; @@ -361,7 +361,7 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w if (ar == 0) goto done; } } - if ((a_x[i + 1] - w > zx) && (a_y[j] <= zy + (zh - h))) + if ((MAX(zx, a_x[i + 1] - w) > zx) && (a_y[j] <= MAX(zy, zy + (zh - h)))) { int ar = 0; @@ -382,7 +382,7 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w if (ar == 0) goto done; } } - if ((a_x[i + 1] - w > zx) && (a_y[j + 1] - h > zy)) + if ((MAX(zx, a_x[i + 1] - w) > zx) && (MAX(zy, a_y[j + 1] - h) > zy)) { int ar = 0; @@ -403,7 +403,7 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w if (ar == 0) goto done; } } - if ((a_x[i] <= zx + (zw - w)) && (a_y[j + 1] - h > zy)) + if ((a_x[i] <= MAX(zx, zx + (zw - w))) && (MAX(zy, a_y[j + 1] - h) > zy)) { int ar = 0; --