tfix crash for small windows - st - [fork] customized build of st, the simple t… | |
git clone git://src.adamsgaard.dk/st | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 23cc3fc5715a650c91e3b99074c31aaf63e2102c | |
parent 160bda1b60148ce8f7d3b001ada2b12f1da9e152 | |
Author: [email protected] <unknown> | |
Date: Tue, 31 Aug 2010 11:40:57 +0200 | |
fix crash for small windows | |
use unconditional infinite loops | |
Diffstat: | |
M st.c | 6 +++++- | |
1 file changed, 5 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/st.c b/st.c | |
t@@ -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… | |
draw(SCREEN_REDRAW); | |
} | |
t@@ -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 w… | |
- while(1) { | |
+ for(;;) { | |
FD_ZERO(&rfd); | |
FD_SET(cmdfd, &rfd); | |
FD_SET(xfd, &rfd); |