commit
edbc788d20
11
st.c
11
st.c
|
@ -738,8 +738,10 @@ sigchld(int a)
|
||||||
if (pid != p)
|
if (pid != p)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!WIFEXITED(stat) || WEXITSTATUS(stat))
|
if (WIFEXITED(stat) && WEXITSTATUS(stat))
|
||||||
die("child finished with error '%d'\n", stat);
|
die("child exited with status %d\n", WEXITSTATUS(stat));
|
||||||
|
else if (WIFSIGNALED(stat))
|
||||||
|
die("child terminated due to signal %d\n", WTERMSIG(stat));
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1504,7 +1506,8 @@ tsetattr(int *attr, int l)
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"erresc(default): gfx attr %d unknown\n",
|
"erresc(default): gfx attr %d unknown\n",
|
||||||
attr[i]), csidump();
|
attr[i]);
|
||||||
|
csidump();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2388,7 +2391,7 @@ eschandle(uchar ascii)
|
||||||
case 'Z': /* DECID -- Identify Terminal */
|
case 'Z': /* DECID -- Identify Terminal */
|
||||||
ttywrite(vtiden, strlen(vtiden), 0);
|
ttywrite(vtiden, strlen(vtiden), 0);
|
||||||
break;
|
break;
|
||||||
case 'c': /* RIS -- Reset to inital state */
|
case 'c': /* RIS -- Reset to initial state */
|
||||||
treset();
|
treset();
|
||||||
resettitle();
|
resettitle();
|
||||||
xloadcols();
|
xloadcols();
|
||||||
|
|
18
x.c
18
x.c
|
@ -699,6 +699,8 @@ cresize(int width, int height)
|
||||||
|
|
||||||
col = (win.w - 2 * borderpx) / win.cw;
|
col = (win.w - 2 * borderpx) / win.cw;
|
||||||
row = (win.h - 2 * borderpx) / win.ch;
|
row = (win.h - 2 * borderpx) / win.ch;
|
||||||
|
col = MAX(1, col);
|
||||||
|
row = MAX(1, row);
|
||||||
|
|
||||||
tresize(col, row);
|
tresize(col, row);
|
||||||
xresize(col, row);
|
xresize(col, row);
|
||||||
|
@ -708,8 +710,8 @@ cresize(int width, int height)
|
||||||
void
|
void
|
||||||
xresize(int col, int row)
|
xresize(int col, int row)
|
||||||
{
|
{
|
||||||
win.tw = MAX(1, col * win.cw);
|
win.tw = col * win.cw;
|
||||||
win.th = MAX(1, row * win.ch);
|
win.th = row * win.ch;
|
||||||
|
|
||||||
XFreePixmap(xw.dpy, xw.buf);
|
XFreePixmap(xw.dpy, xw.buf);
|
||||||
xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h,
|
xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h,
|
||||||
|
@ -758,12 +760,12 @@ xloadcols(void)
|
||||||
static int loaded;
|
static int loaded;
|
||||||
Color *cp;
|
Color *cp;
|
||||||
|
|
||||||
dc.collen = MAX(LEN(colorname), 256);
|
|
||||||
dc.col = xmalloc(dc.collen * sizeof(Color));
|
|
||||||
|
|
||||||
if (loaded) {
|
if (loaded) {
|
||||||
for (cp = dc.col; cp < &dc.col[dc.collen]; ++cp)
|
for (cp = dc.col; cp < &dc.col[dc.collen]; ++cp)
|
||||||
XftColorFree(xw.dpy, xw.vis, xw.cmap, cp);
|
XftColorFree(xw.dpy, xw.vis, xw.cmap, cp);
|
||||||
|
} else {
|
||||||
|
dc.collen = MAX(LEN(colorname), 256);
|
||||||
|
dc.col = xmalloc(dc.collen * sizeof(Color));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < dc.collen; i++)
|
for (i = 0; i < dc.collen; i++)
|
||||||
|
@ -833,15 +835,17 @@ xhints(void)
|
||||||
|
|
||||||
sizeh = XAllocSizeHints();
|
sizeh = XAllocSizeHints();
|
||||||
|
|
||||||
sizeh->flags = PSize | PResizeInc | PBaseSize;
|
sizeh->flags = PSize | PResizeInc | PBaseSize | PMinSize;
|
||||||
sizeh->height = win.h;
|
sizeh->height = win.h;
|
||||||
sizeh->width = win.w;
|
sizeh->width = win.w;
|
||||||
sizeh->height_inc = win.ch;
|
sizeh->height_inc = win.ch;
|
||||||
sizeh->width_inc = win.cw;
|
sizeh->width_inc = win.cw;
|
||||||
sizeh->base_height = 2 * borderpx;
|
sizeh->base_height = 2 * borderpx;
|
||||||
sizeh->base_width = 2 * borderpx;
|
sizeh->base_width = 2 * borderpx;
|
||||||
|
sizeh->min_height = win.ch + 2 * borderpx;
|
||||||
|
sizeh->min_width = win.cw + 2 * borderpx;
|
||||||
if (xw.isfixed) {
|
if (xw.isfixed) {
|
||||||
sizeh->flags |= PMaxSize | PMinSize;
|
sizeh->flags |= PMaxSize;
|
||||||
sizeh->min_width = sizeh->max_width = win.w;
|
sizeh->min_width = sizeh->max_width = win.w;
|
||||||
sizeh->min_height = sizeh->max_height = win.h;
|
sizeh->min_height = sizeh->max_height = win.h;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user