Fri Sep 24 12:30:53 PDT 1999

(KainX)

If there is no iconbox and the user tries to iconify something, create
a default iconbox.  This code does the exact same thing as selecting
"Create New Iconbox" from the menu (except that it's automatic), so it
should be safe.  But feel free to remove it anyway if you don't think
it's ready for 0.16.  It's just the behavior I think users expect. :-)


SVN revision: 391
This commit is contained in:
Michael Jennings 1999-09-24 18:34:36 +00:00
parent 718c90c678
commit 216616bc5c
4 changed files with 28 additions and 5 deletions

View File

@ -2332,3 +2332,14 @@ Fri Sep 24 10:58:11 PDT 1999
(Raster)
fix slideout segfault bug problem thingy majigo
-------------------------------------------------------------------------------
Fri Sep 24 12:30:53 PDT 1999
(KainX)
If there is no iconbox and the user tries to iconify something, create
a default iconbox. This code does the exact same thing as selecting
"Create New Iconbox" from the menu (except that it's automatic), so it
should be safe. But feel free to remove it anyway if you don't think
it's ready for 0.16. It's just the behavior I think users expect. :-)

View File

@ -3365,7 +3365,7 @@ doInsertKeys(void *params)
int
doCreateIconbox(void *params)
{
EDBUG(6, "doSetPagerSnap");
EDBUG(6, "doCreateIconbox");
if (InZoom())
EDBUG_RETURN(0);
if (params)

View File

@ -974,6 +974,18 @@ SelectIconboxForEwin(EWin * ewin)
}
Efree(ib);
}
else
{
/* If there are no iconboxes, create one. */
doCreateIconbox(NULL);
ib = ListAllIconboxes(&num);
if (ib) /* paranoia */
{
ib_sel = ib[0];
Efree(ib);
}
}
return ib_sel;
}

View File

@ -1495,9 +1495,9 @@ IPC_ImageClass(char *params, Client * c)
{
st = STATE_NORMAL;
}
if ((hptr = atword(winptr, 3)))
if ((hptr = atword(params, 6)))
{
w = (int)strtol(atword(winptr, 2), (char **)NULL, 0);
w = (int)strtol(atword(params, 5), (char **)NULL, 0);
h = (int)strtol(hptr, (char **)NULL, 0);
}
IclassApply(iclass, win, w, h, 0, 0, st, 0);
@ -1535,13 +1535,13 @@ IPC_ImageClass(char *params, Client * c)
{
st = STATE_NORMAL;
}
if (!(hptr = atword(winptr, 3)))
if (!(hptr = atword(params, 6)))
{
Esnprintf(buf, sizeof(buf), "Error: missing width and/or height\n");
}
else
{
w = (int)strtol(atword(winptr, 2), (char **)NULL, 0);
w = (int)strtol(atword(params, 5), (char **)NULL, 0);
h = (int)strtol(hptr, (char **)NULL, 0);
IclassApplyCopy(iclass, win, w, h, 0, 0, st, &pmap, &mask);
Esnprintf(buf, sizeof(buf), "0x%08x 0x%08x\n", pmap, mask);