diff options
| author | noname@inventati.org <noname@inventati.org> | 2015-04-11 12:18:57 +0200 |
|---|---|---|
| committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2015-04-13 09:15:42 +0200 |
| commit | d3e0f3444b91418e3d3cda591c5d8c50caa22957 (patch) | |
| tree | 66ac406be5a8b77927423dc0b17def87e54b5e51 | |
| parent | ecac5ee35ef006001b280461ed3f9812d855250c (diff) | |
| download | st-d3e0f3444b91418e3d3cda591c5d8c50caa22957.tar.gz st-d3e0f3444b91418e3d3cda591c5d8c50caa22957.zip | |
Use do..while in window mapping loop.
| -rw-r--r-- | st.c | 6 |
1 files changed, 2 insertions, 4 deletions
| @@ -3917,17 +3917,15 @@ run(void) { | |||
| 3917 | long deltatime; | 3917 | long deltatime; |
| 3918 | 3918 | ||
| 3919 | /* Waiting for window mapping */ | 3919 | /* Waiting for window mapping */ |
| 3920 | while(1) { | 3920 | do { |
| 3921 | XNextEvent(xw.dpy, &ev); | 3921 | XNextEvent(xw.dpy, &ev); |
| 3922 | if(XFilterEvent(&ev, None)) | 3922 | if(XFilterEvent(&ev, None)) |
| 3923 | continue; | 3923 | continue; |
| 3924 | if(ev.type == ConfigureNotify) { | 3924 | if(ev.type == ConfigureNotify) { |
| 3925 | w = ev.xconfigure.width; | 3925 | w = ev.xconfigure.width; |
| 3926 | h = ev.xconfigure.height; | 3926 | h = ev.xconfigure.height; |
| 3927 | } else if(ev.type == MapNotify) { | ||
| 3928 | break; | ||
| 3929 | } | 3927 | } |
| 3930 | } | 3928 | } while(ev.type != MapNotify); |
| 3931 | 3929 | ||
| 3932 | ttynew(); | 3930 | ttynew(); |
| 3933 | cresize(w, h); | 3931 | cresize(w, h); |
