rem: if (wwin && WFLAGP(wwin, always_user_icon))
add: if (wwin && (WFLAGP(wwin, always_user_icon) #ifdef NETWM_HINTS || wwin->net_icon_image #endif ))
context: wIconUpdate(WIcon *icon){    WScreen *scr = icon->core->screen_ptr;    int title_height = WMFontHeight(scr->icon_title_font);    WWindow *wwin = icon->owner;    assert(scr->icon_tile!=NULL);    if (icon->pixmap!=None)	XFreePixmap(dpy, icon->pixmap);    icon->pixmap = None;            if (wwin && WFLAGP(wwin, always_user_icon))	goto user_icon;        /* use client specified icon window */    if (icon->icon_win!=None) {	XWindowAttributes attr;	int resize=0;	int width, height, depth;	int theight;	Pixmap pixmap;	getSize(icon->icon_win, &width, &height, &depth);	if (width > wPreferences.icon_size) {	    resize = 1;	    width = wPreferences.icon_size;	}	if (height > wPreferences.icon_size) {	    resize = 1;	    height = wPreferences.icon_size;	}	if (icon->show_title 	    && (height+title_height < wPreferences.icon_size)) {	    pixmap = XCreatePixmap(dpy, scr->w_win, wPreferences.icon_size,				   wPreferences.icon_size, scr->w_depth);	    XSetClipMask(dpy, scr->copy_gc, None);	    XCopyArea(dpy, scr->icon_tile_pixmap, pixmap, scr->copy_gc, 0, 0,		      wPreferences.icon_size, wPreferences.icon_size, 0, 0);	    drawIconTitle(scr, pixmap, title_height);	    theight = title_height;	} else {	    pixmap = None;	    theight = 0;	    XSetWindowBackgroundPixmap(dpy, icon->core->window,				       scr->icon_tile_pixmap);	}		XSetWindowBorderWidth(dpy, icon->icon_win, 0);	XReparentWindow(dpy, icon->icon_win, icon->core->window,			(wPreferences.icon_size-width)/2,			theight+(wPreferences.icon_size-height-theight)/2);	if (resize)	  XResizeWindow(dpy, icon->icon_win, width, height);	XMapWindow(dpy, icon->icon_win);		XAddToSaveSet(dpy, icon->icon_win);		icon->pixmap = pixmap;	if (XGetWindowAttributes(dpy, icon->icon_win, &attr)) {	    if (attr.all_event_masks & ButtonPressMask) {		wHackedGrabButton(Button1, MOD_MASK, icon->core->window, True, 				  ButtonPressMask, GrabModeSync, GrabModeAsync,				  None, wCursor[WCUR_ARROW]);	    }	}    } else if (wwin && wwin->wm_hints	       && (wwin->wm_hints->flags & IconPixmapHint)) {	int x, y;	unsigned int w, h;	Window jw;	int ji, dotitle;	unsigned int ju, d;	Pixmap pixmap;		if (!XGetGeometry(dpy, wwin->wm_hints->icon_pixmap, &jw, 			  &ji, &ji, &w, &h, &ju, &d)) {	    icon->owner->wm_hints->flags &= ~IconPixmapHint;	    goto user_icon;	}				pixmap = XCreatePixmap(dpy, icon->core->window, wPreferences.icon_size,			       wPreferences.icon_size, scr->w_depth);	XSetClipMask(dpy, scr->copy_gc, None);	XCopyArea(dpy, scr->icon_tile_pixmap, pixmap, scr->copy_gc, 0, 0,		  wPreferences.icon_size, wPreferences.icon_size, 0, 0);	if (w > wPreferences.icon_size)	    w = wPreferences.icon_size;	x = (wPreferences.icon_size-w)/2;	if (icon->show_title && (title_height < wPreferences.icon_size)) {	    drawIconTitle(scr, pixmap, title_height);	    dotitle = 1;	    	    if (h > wPreferences.icon_size - title_height - 2) {		h = wPreferences.icon_size - title_height - 2;		y = title_height + 1;	    } else {		y = (wPreferences.icon_size-h-title_height)/2+title_height + 1;	    }	} else {	    dotitle = 0;	    if (w > wPreferences.icon_size)		w = wPreferences.icon_size;	    y = (wPreferences.icon_size-h)/2;	}	if (wwin->wm_hints->flags & IconMaskHint)	    XSetClipMask(dpy, scr->copy_gc, wwin->wm_hints->icon_mask);		XSetClipOrigin(dpy, scr->copy_gc, x, y);		if (d != scr->w_depth) {	    XSetForeground(dpy, scr->copy_gc, scr->black_pixel);	    XSetBackground(dpy, scr->copy_gc, scr->white_pixel);	    XCopyPlane(dpy, wwin->wm_hints->icon_pixmap, pixmap, scr->copy_gc,		      0, 0, w, h, x, y, 1);	} else {	    XCopyArea(dpy, wwin->wm_hints->icon_pixmap, pixmap, scr->copy_gc,		      0, 0, w, h, x, y);	}		XSetClipOrigin(dpy, scr->copy_gc, 0, 0);		icon->pixmap = pixmap;    } else {      user_icon:          if (icon->image) {              icon->pixmap = makeIcon(scr, icon->image, icon->show_title,				      icon->shadowed, icon->tile_type);          } else {              /* make default icons */              if (!scr->def_icon_pixmap) {                  RImage *image = NULL;                  char *path;                  char *file;                  file = wDefaultGetIconFile(scr, NULL, NULL, False);                  if (file) {                      path = FindImage(wPreferences.icon_path, file);                      if (!path) {                          wwarning(_("could not find default icon \"%s\""),file);                          goto make_icons;                      }                      image = RLoadImage(scr->rcontext, path, 0);                      if (!image) {                          wwarning(_("could not load default icon \"%s\":%s"),				   file, RMessageForError(RErrorCode));                      }                      wfree(path);                  }	make_icons:		  		  image = wIconValidateIconSize(scr, image);                  scr->def_icon_pixmap = makeIcon(scr, image, False, False,						  icon->tile_type);                  scr->def_ticon_pixmap = makeIcon(scr, image, True, False,						   icon->tile_type);		  if (image)		      RReleaseImage(image);              }              if (icon->show_title) {                  XSetWindowBackgroundPixmap(dpy, icon->core->window,                                             scr->def_ticon_pixmap);              } else {                  XSetWindowBackgroundPixmap(dpy, icon->core->window,                                             scr->def_icon_pixmap);              }              icon->pixmap = None;          }    }    if (icon->pixmap != None) {        XSetWindowBackgroundPixmap(dpy, icon->core->window, icon->pixmap);    }    XClearWindow(dpy, icon->core->window);    wIconPaint(icon);}