/** Read the icon WMHint property from a client. */ void ReadWMHintIcon(ClientNode *np) { XWMHints *hints; hints = JXGetWMHints(display, np->window); if(hints) { Drawable d = None; Pixmap mask = None; if(hints->flags & IconMaskHint) { mask = hints->icon_mask; } if(hints->flags & IconPixmapHint) { d = hints->icon_pixmap; } if(d != None) { np->icon = CreateIconFromDrawable(d, mask); } JXFree(hints); } }
/** Read the icon WMHint property from a client. */ IconNode *ReadWMHintIcon(Window win) { IconNode *icon = NULL; XWMHints *hints = JXGetWMHints(display, win); if(hints) { Drawable d = None; Pixmap mask = None; if(hints->flags & IconMaskHint) { mask = hints->icon_mask; } if(hints->flags & IconPixmapHint) { d = hints->icon_pixmap; } if(d != None) { icon = CreateIconFromDrawable(d, mask); } JXFree(hints); } return icon; }