Handle synthetic UnmapNotify events
commit742d85dd0e90a584b9c368ca57094018e0d32a17
authorJulien Danjou <julien@danjou.info>
Mon, 28 Dec 2009 15:41:39 +0000 (28 16:41 +0100)
committerJulien Danjou <julien@danjou.info>
Mon, 28 Dec 2009 15:41:39 +0000 (28 16:41 +0100)
tree8f786af9cd501c8f3f4c1a69689803a8b72ff9f7
parenta4fb1e00f76d3279e72df9dbd7c27e67c3f0df97
Handle synthetic UnmapNotify events

According to the Inter-Client Communication Conventions Manual, if you want to
switch your window to withdrawn state, you unmap it and send a synthetic
UnmapNotify to the root window.

This synthetic event fixes a race condition. When you map and unmap a window
quickly, the map will generate a MapRequest for the WM but won't actually map
the window. Thus, the unmap will be discarded (-> window not yet mapped) and the
window stays map once the WM handles the MapRequest

Before this patch, awesome just ignored the synthetic unmap notify which caused
the bug to appear again. With this patch it doesn't happen anymore.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
event.c