add: wUnmanageWindow(wwin, !reparented, False);
context: handleUnmapNotify(XEvent *event){    WWindow *wwin;    XEvent ev;    Bool withdraw = False;#ifdef DEBUG    puts("got unmap");#endif    /* only process windows with StructureNotify selected      * (ignore SubstructureNotify) */    wwin = wWindowFor(event->xunmap.window);    if (!wwin)	return;    /* whether the event is a Withdrawal request */    if (event->xunmap.event == wwin->screen_ptr->root_win	&& event->xunmap.send_event)	withdraw = True;    if (wwin->client_win != event->xunmap.event && !withdraw)	return;    if (!wwin->flags.mapped && !withdraw	&& wwin->frame->workspace == wwin->screen_ptr->current_workspace	&& !wwin->flags.miniaturized && !wwin->flags.hidden)	return;    XGrabServer(dpy);    XUnmapWindow(dpy, wwin->frame->core->window);    wwin->flags.mapped = 0;    XSync(dpy, 0);    /* check if the window was destroyed */    if (XCheckTypedWindowEvent(dpy, wwin->client_win, DestroyNotify,&ev)) {	DispatchEvent(&ev);    } else {	Bool reparented = False;	if (XCheckTypedWindowEvent(dpy, wwin->client_win, ReparentNotify, &ev))	    reparented = True;	/* withdraw window */	wwin->flags.mapped = 0;	if (!reparented)	    wClientSetState(wwin, WithdrawnState, None);		/* if the window was reparented, do not reparent it back to the	 * root window *///	wUnmanageWindow(wwin, !reparented, False);    }    XUngrabServer(dpy);}