summaryrefslogtreecommitdiffstats
path: root/move/xwait.c
blob: a199b790e14172f04411d1fe25081f273f4807da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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);
}