diff options
author | pancake@nopcode.org <unknown> | 2010-08-31 11:40:57 +0200 |
---|---|---|
committer | pancake@nopcode.org <unknown> | 2010-08-31 11:40:57 +0200 |
commit | 725ec8ff4a45984a669b6773dc5177e629b5e251 (patch) | |
tree | ee016dc4b1a340e074fcab15fa53800ea5fa7aac /st.c | |
parent | 9669f718ab1bbff64fdaef74688909d8b4d85826 (diff) | |
download | st-725ec8ff4a45984a669b6773dc5177e629b5e251.tar.gz st-725ec8ff4a45984a669b6773dc5177e629b5e251.tar.bz2 |
fix crash for small windows
use unconditional infinite loops
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1422,6 +1422,10 @@ resize(XEvent *e) { tresize(col, row); ttyresize(col, row); 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)); draw(SCREEN_REDRAW); } @@ -1436,7 +1440,7 @@ run(void) { XSelectInput(xw.dis, xw.win, mask); XResizeWindow(xw.dis, xw.win, xw.w, xw.h); /* XXX: fix resize bug in wmii (?) */ - while(1) { + for(;;) { FD_ZERO(&rfd); FD_SET(cmdfd, &rfd); FD_SET(xfd, &rfd); |