summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-11-07 12:27:34 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-11-18 11:44:39 -0500
commit99a9312b520066aa88e0ce2a92ed95d9ee90448b (patch)
tree38bd13a730edeac7a7edb1bad6f21a7b872a9faf
parent4c5528a0189316e223ca40e16919f2a07545d1f9 (diff)
clamp e_place calcs to zone geometry
fixes some cases where windows would place wrong due to placement code checking offscreen coords
-rw-r--r--src/bin/e_place.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/e_place.c b/src/bin/e_place.c
index 642a60365..3a25bdcd6 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
339 { 339 {
340 for (i = 0; i < a_w - 1; i++) 340 for (i = 0; i < a_w - 1; i++)
341 { 341 {
342 if ((a_x[i] <= zx + (zw - w)) && 342 if ((a_x[i] <= MAX(zx, zx + (zw - w))) &&
343 (a_y[j] <= zy + (zh - h))) 343 (a_y[j] <= MAX(zy, zy + (zh - h))))
344 { 344 {
345 int ar = 0; 345 int ar = 0;
346 346
@@ -361,7 +361,7 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w
361 if (ar == 0) goto done; 361 if (ar == 0) goto done;
362 } 362 }
363 } 363 }
364 if ((a_x[i + 1] - w > zx) && (a_y[j] <= zy + (zh - h))) 364 if ((MAX(zx, a_x[i + 1] - w) > zx) && (a_y[j] <= MAX(zy, zy + (zh - h))))
365 { 365 {
366 int ar = 0; 366 int ar = 0;
367 367
@@ -382,7 +382,7 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w
382 if (ar == 0) goto done; 382 if (ar == 0) goto done;
383 } 383 }
384 } 384 }
385 if ((a_x[i + 1] - w > zx) && (a_y[j + 1] - h > zy)) 385 if ((MAX(zx, a_x[i + 1] - w) > zx) && (MAX(zy, a_y[j + 1] - h) > zy))
386 { 386 {
387 int ar = 0; 387 int ar = 0;
388 388
@@ -403,7 +403,7 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w
403 if (ar == 0) goto done; 403 if (ar == 0) goto done;
404 } 404 }
405 } 405 }
406 if ((a_x[i] <= zx + (zw - w)) && (a_y[j + 1] - h > zy)) 406 if ((a_x[i] <= MAX(zx, zx + (zw - w))) && (MAX(zy, a_y[j + 1] - h) > zy))
407 { 407 {
408 int ar = 0; 408 int ar = 0;
409 409