diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-10-16 15:41:48 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-10-16 15:41:48 +0000 |
commit | d6aec113996a094aa72403abeb260312dabf1489 (patch) | |
tree | c1a7ebb64f6ac6c4d3e675e404fd743f6f0461e0 /move/xwait.c | |
parent | 4d89878fec3fb80ed273f478745cb78052bad69c (diff) | |
download | drakx-d6aec113996a094aa72403abeb260312dabf1489.tar drakx-d6aec113996a094aa72403abeb260312dabf1489.tar.gz drakx-d6aec113996a094aa72403abeb260312dabf1489.tar.bz2 drakx-d6aec113996a094aa72403abeb260312dabf1489.tar.xz drakx-d6aec113996a094aa72403abeb260312dabf1489.zip |
add xwait and use it
Diffstat (limited to 'move/xwait.c')
-rw-r--r-- | move/xwait.c | 18 |
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); +} |