I am learning X window programming and try a demo program here:
http://users.actcom.co.il/~choo/lupg/tutorials/xlib-programming/simple-drawing.c
which is one sample code of Basic Graphics Programming With The Xlib Library; The link of that tutorial is http://users.actcom.co.il/~choo/lupg/tutorials/xlib-programming/xlib-programming.html
The problem is that the demo above is always blank in my computer. The program should show some basic shapes on the screen but in my computer, the window is just totally white. I'm using Ubuntu 13.04.I compile the code above by gcc simple-drawing.c -o draw -lX11
Another question about Xcreatewindow(): I specify the origin of XCreatewindow(display, parent, x, y, width, height, border_width, depth, class, visual, valuemask, attributes) by setting x = 200, y = 200, but the window still shows on the upper-left corner of my monitor. What does the x and y in XCreatewindow() refer to?