Adapt for recent util/icccm renaming.
[free-sw/xcb/demo] / xcbrandr.c
index 65d0bdc..ed8eebf 100644 (file)
@@ -232,7 +232,7 @@ main (int argc, char **argv)
       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);
   }
@@ -373,7 +373,7 @@ main (int argc, char **argv)
   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;