summaryrefslogtreecommitdiffstats
path: root/move/xwait.c
diff options
context:
space:
mode:
Diffstat (limited to 'move/xwait.c')
-rw-r--r--move/xwait.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/move/xwait.c b/move/xwait.c
new file mode 100644
index 000000000..a199b790e
--- /dev/null
+++ b/move/xwait.c
@@ -0,0 +1,18 @@
+#include <stdlib.h>
+#include <X11/Xlib.h>
+
+int main() {
+ Display *display = XOpenDisplay(NULL);
+
+ if (display) {
+ XEvent event;
+
+ XSelectInput(display, DefaultRootWindow(display), SubstructureNotifyMask);
+ do {
+ XNextEvent(display, &event);
+ } while (event.type != CreateNotify);
+ XCloseDisplay(display);
+ }
+
+ exit(display == NULL);
+}