rem: frame->stacking->under->stacking->above = frame;
add: if (frame->stacking->under) { frame->stacking->under->stacking->above = frame; }
context: wRaiseFrame(WCoreWindow *frame){    WCoreWindow *wlist = frame;    int level = frame->stacking->window_level;    WScreen *scr = frame->screen_ptr;    /* already on top */    if (frame->stacking->above == NULL) {	return;    }    /* insert it on top of other windows on the same level */    if (frame->stacking->under)	frame->stacking->under->stacking->above = frame->stacking->above;    if (frame->stacking->above)	frame->stacking->above->stacking->under = frame->stacking->under;	    frame->stacking->above = NULL;    frame->stacking->under = WMGetFromBag(scr->stacking_list, level);    frame->stacking->under->stacking->above = frame;    WMSetInBag(scr->stacking_list, level, frame);    /* raise transients under us from bottom to top      * so that the order is kept */again:    wlist = frame->stacking->under;    while (wlist && wlist->stacking->under)	wlist = wlist->stacking->under;    while (wlist && wlist!=frame) {	if (wlist->stacking->child_of == frame) {	    wRaiseFrame(wlist);	    goto again;	}	wlist = wlist->stacking->above;    }    /* try to optimize things a little */    if (frame->stacking->above == NULL) {	WMBagIterator iter;	WCoreWindow *above = WMBagLast(scr->stacking_list, &iter);	int i, last = above->stacking->window_level;	/* find the 1st level above us which has windows in it */	for (i = level+1, above = NULL; i <= last; i++) {	    above = WMGetFromBag(scr->stacking_list, i);	    if (above != NULL)		break;	}	if (above != frame && above != NULL) {	    while (above->stacking->under)		above = above->stacking->under;	    moveFrameToUnder(above, frame);	} else {	    /* no window above us */	    above = NULL;	    XRaiseWindow(dpy, frame->window);	}    } else {	moveFrameToUnder(frame->stacking->above, frame);    }    notifyStackChange(frame, "raise");#ifdef VIRTUAL_DESKTOP    wWorkspaceRaiseEdge(scr);#endif}