JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fix typo
[spectrwm.git] / spectrwm.c
index 0379156..3b240f1 100644 (file)
@@ -1992,8 +1992,9 @@ bar_setup(struct swm_region *r)
        xcb_create_pixmap(conn, screen->root_depth, r->bar->buffer, r->bar->id,
            WIDTH(r->bar), HEIGHT(r->bar));
 
-       xcb_randr_select_input(conn, r->bar->id,
-           XCB_RANDR_NOTIFY_MASK_OUTPUT_CHANGE);
+       if (xrandr_support)
+               xcb_randr_select_input(conn, r->bar->id,
+                   XCB_RANDR_NOTIFY_MASK_OUTPUT_CHANGE);
 
        if (bar_enabled)
                map_window_raised(r->bar->id);
@@ -7406,6 +7407,7 @@ clientmessage(xcb_client_message_event_t *e)
        xcb_flush(conn);
 }
 
+#ifdef XCB_CONN_ERROR
 void
 check_conn(void)
 {
@@ -7435,6 +7437,14 @@ check_conn(void)
        if (err)
                errx(err, "X CONNECTION ERROR: %s", s);
 }
+#else
+void
+check_conn(void)
+{
+       if (conn->has_error)
+               errx(1, "X CONNECTION ERROR");
+}
+#endif
 
 int
 enable_wm(void)