i3 - improved tiling WM


Handle synthetic UnmapNotify.

Patch status: needinfo

Patch by oblique

Long description:

Fixes #787, the first bad commit is db651679c568109b19d2c9bb5270f3359d57fd10.

More info:
    http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.4
    http://comments.gmane.org/gmane.comp.misc.suckless/6853

To apply this patch, use:
curl http://cr.i3wm.org/patch/151/raw.patch | git am

b/src/handlers.c

18
@@ -15,6 +15,7 @@
19
 #include <time.h>
20
 #include <sys/time.h>
21
 #include <xcb/randr.h>
22
+#include <xcb/xcb_event.h>
23
 #include <X11/XKBlib.h>
24
 #define SN_API_NOT_YET_FROZEN 1
25
 #include <libsn/sn-monitor.h>
26
@@ -457,6 +458,14 @@ static void handle_unmap_notify_event(xcb_unmap_notify_event_t *event) {
27
         goto ignore_end;
28
     }
29
 
30
+    /* handle synthetic UnmapNotify
31
+     * more info: http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.4
32
+     *            http://comments.gmane.org/gmane.comp.misc.suckless/6853
33
+     * this fix #787 */
34
+    if (event->from_configure == false && event->event == root &&
35
+        XCB_EVENT_SENT(event))
36
+        goto ignore_end;
37
+
38
     /* See the end of this function. */
39
     cookie = xcb_get_input_focus(conn);
40