From d6aec113996a094aa72403abeb260312dabf1489 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 16 Oct 2003 15:41:48 +0000 Subject: add xwait and use it --- move/xwait.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 move/xwait.c (limited to 'move/xwait.c') 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 +#include + +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); +} -- cgit v1.2.1