summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcolorbin16880 -> 16968 bytes
-rw-r--r--color.c59
2 files changed, 25 insertions, 34 deletions
diff --git a/color b/color
index 3731412..00dc18a 100755
--- a/color
+++ b/color
Binary files differ
diff --git a/color.c b/color.c
index 0455cb3..d82a142 100644
--- a/color.c
+++ b/color.c
@@ -1,37 +1,28 @@
+#include <X11/Xlib.h>
#include <stdio.h>
-#include <errno.h>
-#include <string.h>
#include <stdlib.h>
-#include <X11/Xlib.h>
-
-#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 <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;
}
-