this test wasnt valid

This commit is contained in:
Dana Jansens 2007-05-01 00:53:54 +00:00
parent 71cbd4d821
commit 492675fdd3

View file

@ -18,14 +18,14 @@
#include <stdio.h> #include <stdio.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h>
int main () { int main () {
XSetWindowAttributes xswa;
unsigned long xswamask;
Display *display; Display *display;
Window win; Window win;
XEvent report; XEvent report;
int x=10,y=10,h=100,w=400; int x=10,y=10,h=100,w=400;
XSizeHints *hints;
display = XOpenDisplay(NULL); display = XOpenDisplay(NULL);
@ -34,18 +34,23 @@ int main () {
return 0; return 0;
} }
xswa.win_gravity = StaticGravity;
xswamask = CWWinGravity;
win = XCreateWindow(display, RootWindow(display, 0), win = XCreateWindow(display, RootWindow(display, 0),
x, y, w, h, 10, CopyFromParent, CopyFromParent, 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)); XSetWindowBackground(display,win,WhitePixel(display,0));
XMapWindow(display, win); XMapWindow(display, win);
XFlush(display); XFlush(display);
XMoveWindow(display, win, 960-1, 600-1);
XSelectInput(display, win, ExposureMask | StructureNotifyMask); XSelectInput(display, win, ExposureMask | StructureNotifyMask);
while (1) { while (1) {