[hackers] [st] Use do..while in window mapping loop. || noname_AT_inventati.org
commit d3e0f3444b91418e3d3cda591c5d8c50caa22957
Author: noname_AT_inventati.org <noname_AT_inventati.org>
Date: Sat Apr 11 12:18:57 2015 +0200
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
_AT_@ -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);
Received on Tue Apr 14 2015 - 09:56:42 CEST
This archive was generated by hypermail 2.3.0
: Tue Apr 14 2015 - 10:00:16 CEST