summaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authordavidovski <david@sendula.com>2021-04-13 11:51:46 +0100
committerdavidovski <david@sendula.com>2021-04-13 11:51:46 +0100
commitb51a0bc53ddce9314576bfbc4bf7076d19220e20 (patch)
treeddee7dc33ac87421f79b99f40f576a22bd3f6d5d /window.c
parentd6bb142887b06b2d92de359d5784b7ac40fe734d (diff)
tidied up
Diffstat (limited to 'window.c')
-rw-r--r--window.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/window.c b/window.c
deleted file mode 100644
index 0d55011..0000000
--- a/window.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <X11/Xlib.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int main(int argc, const char **argv) {
- Display *d;
- XEvent e;
- const char *message = "do you see the fun in gcc?";
-
- d = XOpenDisplay(NULL);
- if (d == NULL) {
- fprintf(stderr, "error opening display\n");
- exit(1);
- }
-
- int s = DefaultScreen(d);
- Window w = XCreateSimpleWindow(d, RootWindow(d, s), 10, 10, 100, 100, 1, BlackPixel(d, s), WhitePixel(d, s));
-
- XSelectInput(d, w, ExposureMask | KeyPressMask);
- XMapWindow(d, w);
-
- while (1) {
- XNextEvent(d, &e);
- if (e.type == Expose) {
- XDrawString(d, w, DefaultGC(d, s), 10, 50, message, strlen(message));
- }
- }
-
- XCloseDisplay(d);
- return 0;
-}