color/color.c
Brett Weiland e4d8e80042 modified: color
modified:   color.c
2020-07-21 16:42:35 -05:00

29 lines
527 B
C

#include <X11/Xlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
Display *display;
Window window;
XEvent event;
int screen;
d = XOpenDisplay(NULL);
if (d == NULL) {
fprintf(stderr, "Cannot open display\n");
exit(1);
}
screen = DefaultScreen(display);
w = XCreateSimpleWindow(display, RootWindow(display, screen),
10, 10,
100, 100,
1,
BlackPixel(d, s),
WhitePixel(d, s)); //last arg is color
return 0;
}