forked from enlightenment/enlightenment
test given coordinates in smart window placement algorithm
the coordinates passed to this function were never used or tested for being a valid placement location, resulting in any clients which started with a given position being moved to a pre-existing smart placement test case, usually the upper-left or lower-right corners of the screen fix T1106
This commit is contained in:
parent
19b9770291
commit
fa7222ac4c
|
@ -333,6 +333,27 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w
|
||||||
int i, j;
|
int i, j;
|
||||||
int area = 0x7fffffff;
|
int area = 0x7fffffff;
|
||||||
|
|
||||||
|
if ((x <= (zw - w)) &&
|
||||||
|
(y <= (zh - h)))
|
||||||
|
{
|
||||||
|
int ar = 0;
|
||||||
|
|
||||||
|
ar = _e_place_coverage_client_add(desk, skiplist, ar,
|
||||||
|
x, y,
|
||||||
|
w, h);
|
||||||
|
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART)
|
||||||
|
ar = _e_place_coverage_shelf_add(desk, ar,
|
||||||
|
x, y,
|
||||||
|
w, h);
|
||||||
|
if (ar < area)
|
||||||
|
{
|
||||||
|
area = ar;
|
||||||
|
*rx = x;
|
||||||
|
*ry = y;
|
||||||
|
if (ar == 0) goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (j = 0; j < a_h - 1; j++)
|
for (j = 0; j < a_h - 1; j++)
|
||||||
{
|
{
|
||||||
for (i = 0; i < a_w - 1; i++)
|
for (i = 0; i < a_w - 1; i++)
|
||||||
|
|
Loading…
Reference in New Issue