[dev] [st] [PATCH 1/2] Use do..while in window mapping loop.

From: noname <noname_AT_inventati.org>
Date: Sat, 11 Apr 2015 10:18:40 +0000

---
 st.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
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);
-- 
2.3.5
Received on Sat Apr 11 2015 - 12:18:40 CEST

This archive was generated by hypermail 2.3.0 : Sat Apr 11 2015 - 12:24:18 CEST