Esempio n. 1
0
File: hint.c Progetto: Miteam/jwm
/** Read the WM hints for a window. */
void ReadWMHints(Window win, ClientState *state, char alreadyMapped)
{

   XWMHints *wmhints;

   Assert(win != None);
   Assert(state);

   state->status |= STAT_CANFOCUS;
   wmhints = JXGetWMHints(display, win);
   if(wmhints) {
      if(!alreadyMapped && (wmhints->flags & StateHint)) {
         switch(wmhints->initial_state) {
         case IconicState:
            state->status |= STAT_MINIMIZED;
            break;
         default:
            break;
         }
      }
      if((wmhints->flags & InputHint) && wmhints->input == False) {
         state->status &= ~STAT_CANFOCUS;
      }
      if(wmhints->flags & XUrgencyHint) {
         state->status |= STAT_URGENT;
      } else {
         state->status &= ~(STAT_URGENT | STAT_FLASH);
      }
      JXFree(wmhints);
   }

}
Esempio n. 2
0
File: icon.c Progetto: 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);
   }
}
Esempio n. 3
0
File: icon.c Progetto: 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;
}