]> Dogcows Code - chaz/openbox/commitdiff
this test wasnt valid
authorDana Jansens <danakj@orodu.net>
Tue, 1 May 2007 00:53:54 +0000 (00:53 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 1 May 2007 00:53:54 +0000 (00:53 +0000)
tests/grav.c

index 3b37cec655098d615df511bb598dee7b3d695597..0fe32d4983ad35cefe9e44f79c0e8b771f884038 100644 (file)
 
 #include <stdio.h>
 #include <X11/Xlib.h>
+#include <X11/Xutil.h>
 
 int main () {
-  XSetWindowAttributes xswa;
-  unsigned long        xswamask;
   Display   *display;
   Window     win;
   XEvent     report;
   int        x=10,y=10,h=100,w=400;
+  XSizeHints *hints;
 
   display = XOpenDisplay(NULL);
 
@@ -34,18 +34,23 @@ int main () {
     return 0;
   }
 
-  xswa.win_gravity = StaticGravity;
-  xswamask = CWWinGravity;
-
   win = XCreateWindow(display, RootWindow(display, 0),
                      x, y, w, h, 10, CopyFromParent, CopyFromParent,
-                     CopyFromParent, xswamask, &xswa);
+                     CopyFromParent, 0, NULL);
+
+  hints = XAllocSizeHints();
+  hints->flags = PWinGravity;
+  hints->win_gravity = SouthEastGravity;
+  XSetWMNormalHints(display, win, hints);
+  XFree(hints);
 
   XSetWindowBackground(display,win,WhitePixel(display,0)); 
 
   XMapWindow(display, win);
   XFlush(display);
 
+  XMoveWindow(display, win, 960-1, 600-1);
+
   XSelectInput(display, win, ExposureMask | StructureNotifyMask);
 
   while (1) {
This page took 0.029628 seconds and 4 git commands to generate.