compositor-x11: use _checked() with xkb_select_events to test for error
authorRan Benita <ran234@gmail.com>
Tue, 30 Oct 2012 22:13:08 +0000 (00:13 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 31 Oct 2012 14:50:40 +0000 (10:50 -0400)
In order to use xcb_request_check(), given a request without a reply,
you need to use the _checked() variant of the request function.
See xcb-requests(3).

Signed-off-by: Ran Benita <ran234@gmail.com>
src/compositor-x11.c

index 71287e0..c654aec 100644 (file)
@@ -206,14 +206,14 @@ x11_compositor_setup_xkb(struct x11_compositor *c)
        }
        c->xkb_event_base = ext->first_event;
 
-       select = xcb_xkb_select_events(c->conn,
-                                      XCB_XKB_ID_USE_CORE_KBD,
-                                      XCB_XKB_EVENT_TYPE_STATE_NOTIFY,
-                                      0,
-                                      XCB_XKB_EVENT_TYPE_STATE_NOTIFY,
-                                      0,
-                                      0,
-                                      NULL);
+       select = xcb_xkb_select_events_checked(c->conn,
+                                              XCB_XKB_ID_USE_CORE_KBD,
+                                              XCB_XKB_EVENT_TYPE_STATE_NOTIFY,
+                                              0,
+                                              XCB_XKB_EVENT_TYPE_STATE_NOTIFY,
+                                              0,
+                                              0,
+                                              NULL);
        error = xcb_request_check(c->conn, select);
        if (error) {
                weston_log("error: failed to select for XKB state events\n");