e17: move freeing of pending move/resize for new client up to eval0, before layout hook is called

SVN revision: 63099
This commit is contained in:
Hannes Janetzek 2011-09-03 01:32:39 +00:00
parent 46866b4792
commit be4f610554
1 changed files with 29 additions and 29 deletions

View File

@ -6927,6 +6927,7 @@ _e_border_eval0(E_Border *bd)
if (bd->new_client)
{
E_Event_Border_Add *ev;
E_Border_Pending_Move_Resize *pnd;
ev = E_NEW(E_Event_Border_Add, 1);
ev->border = bd;
@ -6936,6 +6937,33 @@ _e_border_eval0(E_Border *bd)
if ((!bd->lock_border) || (!bd->client.border.name))
bd->client.border.changed = 1;
EINA_LIST_FREE(bd->pending_move_resize, pnd)
{
if ((!bd->lock_client_location) && (pnd->move))
{
bd->x = pnd->x;
bd->y = pnd->y;
bd->changes.pos = 1;
bd->placed = 1;
if (pnd->without_border)
{
bd->x -= bd->client_inset.l;
bd->y -= bd->client_inset.t;
}
}
if ((!bd->lock_client_size) && (pnd->resize))
{
bd->w = pnd->w + (bd->client_inset.l + bd->client_inset.r);
bd->h = pnd->h + (bd->client_inset.t + bd->client_inset.b);
bd->client.w = pnd->w;
bd->client.h = pnd->h;
bd->changes.size = 1;
}
printf("free pendig %dx%d\n", bd->w, bd->h);
free(pnd);
}
}
/* PRE_POST_FETCH calls e_remember apply for new client */
@ -7162,7 +7190,6 @@ static void
_e_border_eval(E_Border *bd)
{
E_Event_Border_Property *event;
E_Border_Pending_Move_Resize *pnd;
int rem_change = 0;
int send_event = 1;
@ -7355,30 +7382,6 @@ _e_border_eval(E_Border *bd)
bd->y = new_y;
bd->changes.pos = 1;
}
EINA_LIST_FREE(bd->pending_move_resize, pnd)
{
if ((!bd->lock_client_location) && (pnd->move))
{
bd->x = pnd->x;
bd->y = pnd->y;
bd->changes.pos = 1;
bd->placed = 1;
if (pnd->without_border)
{
bd->x -= bd->client_inset.l;
bd->y -= bd->client_inset.t;
}
}
if ((!bd->lock_client_size) && (pnd->resize))
{
bd->w = pnd->w + (bd->client_inset.l + bd->client_inset.r);
bd->h = pnd->h + (bd->client_inset.t + bd->client_inset.b);
bd->client.w = pnd->w;
bd->client.h = pnd->h;
bd->changes.size = 1;
}
free(pnd);
}
/* Recreate state */
e_hints_window_init(bd);
@ -7419,10 +7422,7 @@ _e_border_eval(E_Border *bd)
bd->x,
bd->y + bd->h - 1);
if ((zone) && (zone != bd->zone))
{
e_border_zone_set(bd, zone);
/* e_zone_useful_geometry_get(zone, &zx, &zy, &zw, &zh); */
}
e_border_zone_set(bd, zone);
}
}