Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <X11/Xlib.h>
- int main (int argc, char**argv)
- {
- Display *display;
- Window window;
- XSetWindowAttributes attributes;
- Visual *visual;
- int depth;
- int screen;
- char s[3];
- display = XOpenDisplay(NULL);
- screen = DefaultScreen(display);
- visual = DefaultVisual(display,screen);
- depth = DefaultDepth(display,screen);
- attributes.background_pixel = XWhitePixel(display,screen);
- attributes.override_redirect = True;
- window = XCreateWindow( display,XRootWindow(display,screen),
- 200, 200, 350, 200, 5, depth, InputOutput,
- visual, CWOverrideRedirect|CWBackPixel, &attributes);
- XMoveWindow(display, window, 1000, 1000);
- XMapWindow(display, window);
- XFlush(display);
- fgets(s, 2, stdin);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment