mirror of
https://github.com/alrayyes/st.git
synced 2024-11-25 20:36:23 +00:00
fix crash for small windows
use unconditional infinite loops
This commit is contained in:
parent
160bda1b60
commit
23cc3fc571
1 changed files with 5 additions and 1 deletions
6
st.c
6
st.c
|
@ -1422,6 +1422,10 @@ resize(XEvent *e) {
|
||||||
tresize(col, row);
|
tresize(col, row);
|
||||||
ttyresize(col, row);
|
ttyresize(col, row);
|
||||||
XFreePixmap(xw.dis, xw.buf);
|
XFreePixmap(xw.dis, xw.buf);
|
||||||
|
if(xw.bufh<1)
|
||||||
|
xw.bufh = 1;
|
||||||
|
if(xw.bufw<1)
|
||||||
|
xw.bufw = 1;
|
||||||
xw.buf = XCreatePixmap(xw.dis, xw.win, xw.bufw, xw.bufh, XDefaultDepth(xw.dis, xw.scr));
|
xw.buf = XCreatePixmap(xw.dis, xw.win, xw.bufw, xw.bufh, XDefaultDepth(xw.dis, xw.scr));
|
||||||
draw(SCREEN_REDRAW);
|
draw(SCREEN_REDRAW);
|
||||||
}
|
}
|
||||||
|
@ -1436,7 +1440,7 @@ run(void) {
|
||||||
XSelectInput(xw.dis, xw.win, mask);
|
XSelectInput(xw.dis, xw.win, mask);
|
||||||
XResizeWindow(xw.dis, xw.win, xw.w, xw.h); /* XXX: fix resize bug in wmii (?) */
|
XResizeWindow(xw.dis, xw.win, xw.w, xw.h); /* XXX: fix resize bug in wmii (?) */
|
||||||
|
|
||||||
while(1) {
|
for(;;) {
|
||||||
FD_ZERO(&rfd);
|
FD_ZERO(&rfd);
|
||||||
FD_SET(cmdfd, &rfd);
|
FD_SET(cmdfd, &rfd);
|
||||||
FD_SET(xfd, &rfd);
|
FD_SET(xfd, &rfd);
|
||||||
|
|
Loading…
Reference in a new issue