*/
#include <stdio.h>
-#include <X11/XCB/xcb.h>
-#include <X11/XCB/xcb_aux.h>
-#include <X11/XCB/randr.h>
-#include <X11/XCB/render.h> /* we share subpixel information */
+#include <xcb/xcb.h>
+#include <xcb/xcb_aux.h>
+#include <xcb/randr.h>
+#include <xcb/render.h> /* we share subpixel information */
#include <string.h>
#include <stdlib.h>
exit (1);
}
c = xcb_connect(display_name, &screen);
- if (!c) {
+ if (xcb_connection_has_error(c)) {
fprintf (stderr, "Can't open display %s\n", display_name);
exit (1);
}
values[0] = 1;
xcb_configure_window(c, root->root, mask, values);
- if (setit) xcb_randr_select_input (c, root->root, XCB_RANDR_SM_SCREEN_CHANGE_NOTIFY);
+ if (setit) xcb_randr_select_input (c, root->root, XCB_RANDR_NOTIFY_MASK_SCREEN_CHANGE);
if (setit) {
xcb_randr_set_screen_config_cookie_t sscc;
printf("Got a screen change notify event!\n");
printf(" window = %d\n root = %d\n size_index = %d\n rotation %d\n",
- (int) sce->request_window.xid, (int) sce->root.xid,
+ (int) sce->request_window, (int) sce->root,
sce->sizeID, sce->rotation);
printf(" timestamp = %d, config_timestamp = %d\n",
sce->timestamp, sce->config_timestamp);