Use do..while in window mapping loop.
noname@inventati.org noname@inventati.org
1 files changed,
2 insertions(+),
4 deletions(-)
jump to
M
st.c
→
st.c
@@ -3917,17 +3917,15 @@ struct timespec drawtimeout, *tv = NULL, now, last, lastblink;
long deltatime; /* Waiting for window mapping */ - while(1) { + do { XNextEvent(xw.dpy, &ev); if(XFilterEvent(&ev, None)) continue; if(ev.type == ConfigureNotify) { w = ev.xconfigure.width; h = ev.xconfigure.height; - } else if(ev.type == MapNotify) { - break; } - } + } while(ev.type != MapNotify); ttynew(); cresize(w, h);