[Xcb-commit] xcb-demo

Ian Osgood iano at kemper.freedesktop.org
Sun Jul 30 14:39:13 PDT 2006


 xcb-demo/neko/xcbneko.c |   29 +++++++++--------------------
 1 files changed, 9 insertions(+), 20 deletions(-)

New commits:
diff-tree 3cc5d9000f5aef5c089c24647a95e89fe7fd8d56 (from 8e9fc90da8350fa77f5b0e02d5357011932591aa)
Author: Ian Osgood <iano at quirkster.com>
Date:   Sun Jul 30 14:38:53 2006 -0700

    neko: use WMHints stuff from Vincent.

diff --git a/xcb-demo/neko/xcbneko.c b/xcb-demo/neko/xcbneko.c
index 0e94320..b0b6311 100644
--- a/xcb-demo/neko/xcbneko.c
+++ b/xcb-demo/neko/xcbneko.c
@@ -690,30 +690,19 @@ InitScreen( char *DisplayName, char *the
 
 	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();


More information about the xcb-commit mailing list