From: noname@inventati.org Date: Sat, 11 Apr 2015 10:18:57 +0000 (+0200) Subject: Use do..while in window mapping loop. X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=d3e0f3444b91418e3d3cda591c5d8c50caa22957;p=st.git Use do..while in window mapping loop. --- diff --git a/st.c b/st.c index b2bcfe9..83acd56 100644 --- a/st.c +++ b/st.c @@ -3917,17 +3917,15 @@ run(void) { 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);