event.c
changeset 927 60d5a92ce85c
parent 926 6f9cf0cfe278
child 939 a1ac5930ba2f
equal deleted inserted replaced
926:6f9cf0cfe278 927:60d5a92ce85c
   334 static void
   334 static void
   335 unmapnotify(XEvent *e) {
   335 unmapnotify(XEvent *e) {
   336 	Client *c;
   336 	Client *c;
   337 	XUnmapEvent *ev = &e->xunmap;
   337 	XUnmapEvent *ev = &e->xunmap;
   338 
   338 
   339 	if((c = getclient(ev->window)))
   339 	if((c = getclient(ev->window)) && (ev->event == root)) {
   340 		unmanage(c);
   340 		if(ev->send_event || c->unmapped-- == 0)
       
   341 			unmanage(c);
       
   342 	}
   341 }
   343 }
   342 
   344 
   343 /* extern */
   345 /* extern */
   344 
   346 
   345 void (*handler[LASTEvent]) (XEvent *) = {
   347 void (*handler[LASTEvent]) (XEvent *) = {