From e4d8e8004267c45174706def0316162526a4872a Mon Sep 17 00:00:00 2001 From: Brett Weiland Date: Tue, 21 Jul 2020 16:42:35 -0500 Subject: modified: color modified: color.c --- color.c | 59 +++++++++++++++++++++++++---------------------------------- 1 file changed, 25 insertions(+), 34 deletions(-) (limited to 'color.c') diff --git a/color.c b/color.c index 0455cb3..d82a142 100644 --- a/color.c +++ b/color.c @@ -1,37 +1,28 @@ +#include #include -#include -#include #include -#include - -#define START_COLOR 0xffffff - -int main() { - Display *display; - Window window; - int screen; - - - if((display = XOpenDisplay(NULL)) == NULL) { - printf("There was an error opening the screen: %s\n", strerror(errno)); - exit(errno); - } - - screen = DefaultScreen(display); - - window = XCreateSimpleWindow( - display, - RootWindow(display, screen), - 10, 10, - 1000, 1000, - 0, - BlackPixel(display, screen), - WhitePixel(display, screen)); - - XMapWindow(display, screen); - XFlush(display); - - //github testing - +#include + +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; } - -- cgit v1.2.3