+ XSetErrorHandler(xerror_handler);
+
+ /* read what extensions are present */
+#ifdef XKB
+ major = XkbMajorVersion;
+ minor = XkbMinorVersion;
+ obt_display_extension_xkb =
+ XkbQueryExtension(d, &junk,
+ &obt_display_extension_xkb_basep, &junk,
+ &major, &minor);
+ if (!obt_display_extension_xkb)
+ g_message("XKB extension is not present on the server or too old");
+#endif
+
+#ifdef SHAPE
+ obt_display_extension_shape =
+ XShapeQueryExtension(d, &obt_display_extension_shape_basep,
+ &junk);
+ if (!obt_display_extension_shape)
+ g_message("X Shape extension is not present on the server");
+#endif
+
+#ifdef XINERAMA
+ obt_display_extension_xinerama =
+ XineramaQueryExtension(d,
+ &obt_display_extension_xinerama_basep,
+ &junk) && XineramaIsActive(d);
+ if (!obt_display_extension_xinerama)
+ g_message("Xinerama extension is not present on the server");
+#endif
+
+#ifdef XRANDR
+ obt_display_extension_randr =
+ XRRQueryExtension(d, &obt_display_extension_randr_basep,
+ &junk);
+ if (!obt_display_extension_randr)
+ g_message("XRandR extension is not present on the server");
+#endif
+
+#ifdef SYNC
+ obt_display_extension_sync =
+ XSyncQueryExtension(d, &obt_display_extension_sync_basep,
+ &junk) && XSyncInitialize(d, &junk, &junk);
+ if (!obt_display_extension_sync)
+ g_message("X Sync extension is not present on the server or is an "
+ "incompatible version");
+#endif
+
+ obt_prop_startup();
+ obt_keyboard_reload();