示例#1
0
文件: icon.c 项目: KarlGodt/jwm
/** 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);
   }
}
示例#2
0
文件: icon.c 项目: Miteam/jwm
/** 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;
}