aboutsummaryrefslogtreecommitdiffstats
path: root/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'event.c')
-rw-r--r--event.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/event.c b/event.c
index b870821..d0716fa 100644
--- a/event.c
+++ b/event.c
@@ -336,8 +336,10 @@ unmapnotify(XEvent *e) {
Client *c;
XUnmapEvent *ev = &e->xunmap;
- if((c = getclient(ev->window)))
- unmanage(c);
+ if((c = getclient(ev->window)) && (ev->event == root)) {
+ if(ev->send_event || c->unmapped-- == 0)
+ unmanage(c);
+ }
}
/* extern */