[dev] [st] [PATCH 2/2] Simplify window mapping loop.

From: noname <noname_AT_inventati.org>
Date: Thu, 9 Apr 2015 20:05:08 +0000

---
 st.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/st.c b/st.c
index a7064b1..c311164 100644
--- a/st.c
+++ b/st.c
_AT_@ -3917,17 +3917,13 @@ 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);
-- 
1.8.4
Received on Thu Apr 09 2015 - 22:05:08 CEST

This archive was generated by hypermail 2.3.0 : Thu Apr 09 2015 - 22:12:13 CEST