#include #include /* pause() */ #include int main () { /* Open the connection to the X server */ xcb_connection_t *connection = xcb_connect (NULL, NULL); /* Get the first screen */ const xcb_setup_t *setup = xcb_get_setup (connection); xcb_screen_iterator_t iter = xcb_setup_roots_iterator (setup); xcb_screen_t *screen = iter.data; printf ("root window id %d\n", screen->root); xcb_disconnect (connection); return 0; }