forked from e16/e16
1
0
Fork 0

Prepare for iconbox/pager layout handling changes.

SVN revision: 14899
This commit is contained in:
Kim Woelders 2005-05-22 07:54:52 +00:00
parent a94ac5552c
commit 7ec415043a
2 changed files with 19 additions and 12 deletions

View File

@ -785,6 +785,8 @@ struct _ewin
} ewmh;
int shape_x, shape_y, shape_w, shape_h;
int req_x, req_y;
void (*Layout) (EWin * ewin, int *px, int *py, int *pw,
int *ph);
void (*MoveResize) (EWin * ewin, int resize);
void (*Close) (EWin * ewin);
};

View File

@ -354,29 +354,27 @@ doMoveResizeEwin(EWin * ewin, int desk, int x, int y, int w, int h, int flags)
if (flags & MRF_RAISE)
raise = 1;
if (flags & MRF_MOVE)
if (!(flags & MRF_MOVE))
{
dx = x - EoGetX(ewin);
dy = y - EoGetY(ewin);
if ((dx != 0) || (dy != 0))
move = 1;
ewin->client.x = x + ewin->border->border.left;
ewin->client.y = y + ewin->border->border.top;
}
else
{
dx = dy = 0;
x = EoGetX(ewin);
y = EoGetY(ewin);
}
if (flags & MRF_RESIZE)
{
if (ewin->Layout)
{
ewin->Layout(ewin, &x, &y, &w, &h);
}
else
{
ICCCM_SizeMatch(ewin, w, h, &w, &h);
}
if ((w != ewin->client.w) || (h != ewin->client.h))
resize = 2;
ewin->client.w = w;
ewin->client.h = h;
ICCCM_MatchSize(ewin);
/* Don't touch frame size while shaded */
if (ewin->shaded)
@ -398,6 +396,13 @@ doMoveResizeEwin(EWin * ewin, int desk, int x, int y, int w, int h, int flags)
h = EoGetH(ewin);
}
dx = x - EoGetX(ewin);
dy = y - EoGetY(ewin);
if ((dx != 0) || (dy != 0))
move = 1;
ewin->client.x = x + ewin->border->border.left;
ewin->client.y = y + ewin->border->border.top;
#if 0
Eprintf("repa=%d float=%d raise=%d move=%d resz=%d\n",
reparent, floating, raise, move, resize);