rem: frame->stacking->under = wlist->stacking->under; if (wlist->stacking->under) wlist->stacking->under->stacking->above = frame; wlist->stacking->under = frame;
add: if (wlist) { frame->stacking->under = wlist->stacking->under; if (wlist->stacking->under) wlist->stacking->under->stacking->above = frame; wlist->stacking->under = frame; } else { frame->stacking->under = NULL; }
context: wLowerFrame(WCoreWindow *frame){    WScreen *scr = frame->screen_ptr;    WCoreWindow *wlist=frame;    int level = frame->stacking->window_level;    /* already in bottom */    if (wlist->stacking->under == NULL) {	return;    }    /* cant lower transient below below its owner */    if (wlist->stacking->under == wlist->stacking->child_of) {	return;    }    /* remove from the list */    if (WMGetFromBag(scr->stacking_list, level) == frame) {	/* it was the top window */	WMSetInBag(scr->stacking_list, level, frame->stacking->under);	frame->stacking->under->stacking->above = NULL;    } else {	if (frame->stacking->under)	    frame->stacking->under->stacking->above = frame->stacking->above;	if (frame->stacking->above)	    frame->stacking->above->stacking->under = frame->stacking->under;    }    wlist = WMGetFromBag(scr->stacking_list, level);    /* look for place to put this window */    {	WCoreWindow *owner = frame->stacking->child_of;		if (owner != wlist) {	    while (wlist->stacking->under) {		/* if this is a transient, it should not be placed under 		 * it's owner */		if (owner == wlist->stacking->under)		    break;		wlist = wlist->stacking->under;	    }	}    }     /* insert under the place found */    frame->stacking->above = wlist;    frame->stacking->under = wlist->stacking->under;    if (wlist->stacking->under)	wlist->stacking->under->stacking->above = frame;    wlist->stacking->under = frame;    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 below us */	    XLowerWindow(dpy, frame->window);	}    } else {	moveFrameToUnder(frame->stacking->above, frame);    }    notifyStackChange(frame, "lower");        }