rem: wwin->flags.ignore_next_unmap = 1;
context: handleMapRequest(XEvent *ev){    WWindow *wwin;    WScreen *scr = NULL;    Window window = ev->xmaprequest.window;#ifdef DEBUG    printf("got map request for %x\n", (unsigned)window);#endif    if ((wwin=wWindowFor(window))) {	if (wwin->flags.shaded) {	    wUnshadeWindow(wwin);	}	/* deiconify window */	if (wwin->flags.miniaturized) {	    wDeiconifyWindow(wwin);	} else if (wwin->flags.hidden) {            WApplication *wapp = wApplicationOf(wwin->main_window);            /* go to the last workspace that the user worked on the app */#ifndef REDUCE_APPICONS            /* This severely breaks REDUCE_APPICONS.  last_workspace is a neat             * concept but it needs to be reworked to handle REDUCE_APPICONS -cls             */            if (wapp) {                wWorkspaceChange(wwin->screen_ptr, wapp->last_workspace);            }#endif	    wUnhideApplication(wapp, False, False);	}	return;    }    scr = wScreenForRootWindow(ev->xmaprequest.parent);    wwin = wManageWindow(scr, window);    /*      * This is to let the Dock know that the application it launched     * has already been mapped (eg: it has finished launching).      * It is not necessary for normally docked apps, but is needed for     * apps that were forcedly docked (like with dockit).     */    if (scr->last_dock) {	if (wwin && wwin->main_window!=None && wwin->main_window!=window)	  wDockTrackWindowLaunch(scr->last_dock, wwin->main_window);	else	  wDockTrackWindowLaunch(scr->last_dock, window);    }    if (wwin) {	int state;		if (wwin->wm_hints && (wwin->wm_hints->flags & StateHint))	    state = wwin->wm_hints->initial_state;	else	    state = NormalState;        if (state==IconicState)            wwin->flags.miniaturized = 1;        if (state == WithdrawnState) {	    wwin->flags.mapped = 0;	    wClientSetState(wwin, WithdrawnState, None);	    wUnmanageWindow(wwin, True, False);        } else {            wClientSetState(wwin, NormalState, None);	    if (wwin->flags.maximized) {		wMaximizeWindow(wwin, wwin->flags.maximized);	    }            if (wwin->flags.shaded) {                wwin->flags.shaded = 0;                wwin->flags.skip_next_animation = 1;                wwin->flags.ignore_next_unmap = 1; /* ??? */                wShadeWindow(wwin);            }            if (wwin->flags.miniaturized) {                wwin->flags.miniaturized = 0;                wwin->flags.hidden = 0;                wwin->flags.skip_next_animation = 1;                wwin->flags.ignore_next_unmap = 1;                wIconifyWindow(wwin);            } else if (wwin->flags.hidden) {                WApplication *wapp = wApplicationOf(wwin->main_window);                wwin->flags.hidden = 0;                wwin->flags.skip_next_animation = 1;                if (wapp) {                    wHideApplication(wapp);                }                wwin->flags.ignore_next_unmap = 1;            }        }    }}