rem: if (scr->menu_item_texture->any.type != WTEX_SOLID) { if (!menu->flags.brother) { FREE_PIXMAP(menu->menu_texture_data);  wTextureRender(scr, scr->menu_item_texture, &menu->menu_texture_data, menu->menu->width, menu->entry_height, WREL_MENUENTRY);  XSetWindowBackgroundPixmap(dpy, menu->menu->window, menu->menu_texture_data); XClearWindow(dpy, menu->menu->window);  XSetWindowBackgroundPixmap(dpy, menu->brother->menu->window, menu->menu_texture_data); XClearWindow(dpy, menu->brother->menu->window); } } else { XSetWindowBackground(dpy, menu->menu->window, scr->menu_item_texture->any.color.pixel); XClearWindow(dpy, menu->menu->window); }
add: updateTexture(menu);
context: wMenuRealize(WMenu *menu){    int i;    int width, rwidth, mrwidth, mwidth;    int theight, twidth, eheight;    WScreen *scr = menu->frame->screen_ptr;    static int brother_done=0;    int flags;    if (!brother_done) {	brother_done = 1;	wMenuRealize(menu->brother);	brother_done = 0;    }    flags = WFF_SINGLE_STATE;    if (menu->flags.titled)	flags |= WFF_TITLEBAR|WFF_RIGHT_BUTTON;    wFrameWindowUpdateBorders(menu->frame, flags);    if (menu->flags.titled) {	twidth = wTextWidth(scr->menu_title_font->font, menu->frame->title,			     strlen(menu->frame->title));        theight = menu->frame->top_width;        twidth += theight + (wPreferences.new_style ? 16 : 8);    } else {	twidth = 0;	theight = 0;    }    eheight = scr->menu_entry_font->height + 6;    menu->entry_height = eheight;    mrwidth = 0;    mwidth = 0;    for (i=0; i<menu->entry_no; i++) {	char *text;	/* search widest text */	text = menu->entries[i]->text;	width = wTextWidth(scr->menu_entry_font->font, text, strlen(text))+10;	if (menu->entries[i]->flags.indicator) {	    width += MENU_INDICATOR_SPACE;	}	if (width > mwidth)	    mwidth = width;		/* search widest text on right */	text = menu->entries[i]->rtext;	if (text)	    rwidth = wTextWidth(scr->menu_entry_font->font, text,				 strlen(text)) + 5;	else if (menu->entries[i]->cascade>=0)	    rwidth = 16;	else	    rwidth = 4;	if (rwidth > mrwidth)	    mrwidth = rwidth;    }    mwidth += mrwidth;        if (mwidth < twidth)	mwidth = twidth;        wCoreConfigure(menu->menu, 0, theight, mwidth, menu->entry_no*eheight -1);    wFrameWindowResize(menu->frame, mwidth, menu->entry_no*eheight-1		       + menu->frame->top_width + menu->frame->bottom_width);    /* setup background texture */    if (scr->menu_item_texture->any.type != WTEX_SOLID) {	if (!menu->flags.brother) {	    FREE_PIXMAP(menu->menu_texture_data);	    wTextureRender(scr, scr->menu_item_texture,			   &menu->menu_texture_data, menu->menu->width,			   menu->entry_height, WREL_MENUENTRY);	    XSetWindowBackgroundPixmap(dpy, menu->menu->window,				       menu->menu_texture_data);	    XClearWindow(dpy, menu->menu->window);	    XSetWindowBackgroundPixmap(dpy, menu->brother->menu->window,				       menu->menu_texture_data);	    XClearWindow(dpy, menu->brother->menu->window);	}    } else {	XSetWindowBackground(dpy, menu->menu->window,			     scr->menu_item_texture->any.color.pixel);	XClearWindow(dpy, menu->menu->window);    }    menu->flags.realized = 1;    if (menu->flags.mapped)	wMenuPaint(menu);    if (menu->brother->flags.mapped)	wMenuPaint(menu->brother);}