#include #include int main( int argc, char* argv[] ) { Display* dpy = XOpenDisplay( NULL ); XSetWindowAttributes attrs; Window w = XCreateWindow( dpy, DefaultRootWindow( dpy ), 0, 0, 100, 100, 0, CopyFromParent, CopyFromParent, CopyFromParent, 0, &attrs ); XSelectInput( dpy, w, PropertyChangeMask ); XStoreName( dpy, w, "test" ); for(;;) { XEvent ev; XNextEvent( dpy, &ev ); if( ev.type == PropertyNotify ) { fprintf( stderr, "%d\n", ev.xproperty.time ); break; } } XCloseDisplay( dpy ); }