diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-05-01 00:53:54 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-05-01 00:53:54 +0000 |
| commit | 492675fdd3427e52b80f347599d5c6ddc42f454b (patch) | |
| tree | 5a7550465241ff611282f87f41f3fb695a6caea6 /tests | |
| parent | 71cbd4d8210a7f1b067556e6712e918fe150ca1f (diff) | |
this test wasnt valid
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/grav.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/grav.c b/tests/grav.c index 3b37cec6..0fe32d49 100644 --- a/tests/grav.c +++ b/tests/grav.c @@ -18,14 +18,14 @@ #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) { |
