void menu_stacking(WMenu *menu, Window *bottomret, Window *topret) { *topret=None; if(menu->submenu!=NULL) region_stacking((WRegion*)(menu->submenu), bottomret, topret); *bottomret=MENU_WIN(menu); if(*topret==None) *topret=MENU_WIN(menu); }
static void stack_restack_reg(WRegion *reg, Window *other, int *mode) { Window b=None, t=None; if(reg!=NULL){ region_restack(reg, *other, *mode); region_stacking(reg, &b, &t); if(t!=None){ *other=t; *mode=Above; } } }
static void stack_stacking_reg(WRegion *reg, Window *bottomret, Window *topret) { Window b=None, t=None; if(reg!=NULL){ region_stacking(reg, &b, &t); if(*bottomret==None) *bottomret=b; if(t!=None) *topret=t; } }
static void get_bottom(WStacking *st, Window fb_win, Window *other, int *mode) { Window bottom=None, top=None; while(st!=NULL){ if(st->reg!=NULL){ region_stacking(st->reg, &bottom, &top); if(bottom!=None){ *other=bottom; *mode=Below; return; } } st=st->next; } *other=fb_win; *mode=Above; }