neko: use WMHints stuff from Vincent.
authorIan Osgood <iano@quirkster.com>
Sun, 30 Jul 2006 21:38:53 +0000 (14:38 -0700)
committerIan Osgood <iano@quirkster.com>
Sun, 30 Jul 2006 21:38:53 +0000 (14:38 -0700)
neko/xcbneko.c

index 0e94320..b0b6311 100644 (file)
@@ -690,30 +690,19 @@ InitScreen( char *DisplayName, char *theGeometry, char *theTitle, Bool iconicSta
 
        theIconPixmap = CreateBitmapFromData( xc, theWindow,
                                                                                  icon_bits, icon_width, icon_height );
-#ifdef TODO_ICCCM
-       theWMHints.icon_pixmap = theIconPixmap;
-       
+
+       WMHints *theWMHints = AllocWMHints();
+
+       WMHintsSetIconPixmap( theWMHints, theIconPixmap );
+
        if ( iconicState )
-         theWMHints.initial_state = IconicState;
+         WMHintsSetIconic( theWMHints );
        else
-         theWMHints.initial_state = NormalState;
+         WMHintsSetNormal( theWMHints );
        
-       theWMHints.flags = IconPixmapHint | StateHint;
+       SetWMHints( xc, theWindow, theWMHints);
        
-       XSetWMHints( theDisplay, theWindow, &theWMHints );
-#else
-    /* Um... there is no function to send the hints...
-       WMHints              theWMHints;
-       WMHintsSetIconPixmap( &theHints, theIconPixmap );
-
-       if ( iconicState )
-         WMHintsSetIconic( &theHints );
-       else
-         WMHintsSetNormal( &theHints );
-         
-       Now what?
-    */
-#endif
+       free( theWMHints );
 
        /* why hide the structure? */
        SizeHints *theSizeHints = AllocSizeHints();