Make sure pager and iconbox are resized during startup.

SVN revision: 8994
This commit is contained in:
Kim Woelders 2004-02-16 22:03:44 +00:00
parent 704bf03e5c
commit 80a2704173
2 changed files with 20 additions and 10 deletions

View File

@ -547,23 +547,29 @@ IconboxShow(Iconbox * ib)
if (ewin)
{
Snapshot *sn;
int w, h;
ib->ewin = ewin;
ewin->ibox = ib;
IB_Reconfigure(ib);
sn = FindSnapshot(ewin);
ConformEwinToDesktop(ewin);
ShowEwin(ewin);
w = ewin->client.w;
h = ewin->client.h;
ewin->client.w = 1;
ewin->client.h = 1;
if (sn)
{
ResizeEwin(ewin, ewin->client.w, ewin->client.h);
ResizeEwin(ewin, w, h);
}
else
{
MakeWindowSticky(ewin);
MoveResizeEwin(ewin, root.w - 160, root.h - ewin->client.h,
160, ewin->client.h);
MoveResizeEwin(ewin, root.w - 160, root.h - h, 160, h);
}
ShowEwin(ewin);
}
queue_up = pq;
}

View File

@ -302,7 +302,7 @@ PagerShow(Pager * p)
if (ewin)
{
char s[4096];
int ax, ay;
int ax, ay, w, h;
Snapshot *sn;
double aspect;
@ -320,20 +320,24 @@ PagerShow(Pager * p)
p->ewin = ewin;
p->visible = 1;
sn = FindSnapshot(ewin);
/* get the size right damnit! */
w = ewin->client.w;
h = ewin->client.h;
ewin->client.w = 1;
ewin->client.h = 1;
if (sn)
{
ResizeEwin(ewin, ewin->client.w, ewin->client.h);
ResizeEwin(ewin, w, h);
}
else
{
/* no snapshots ? first time ? make a row on the bottom left up */
MoveResizeEwin(ewin, 0,
root.h - (conf.desks.num -
p->desktop) * ewin->h, ewin->client.w,
ewin->client.h);
MoveResizeEwin(ewin, 0, root.h - (conf.desks.num -
p->desktop) * ewin->h, w, h);
}
PagerRedraw(p, 1);
/* show the pager ewin */
ShowEwin(ewin);
if (((sn) && (sn->use_sticky) && (sn->sticky)) || (!sn))