From: Michael Stapelberg Date: Sun, 31 Jul 2011 16:19:41 +0000 (+0200) Subject: xcb: don’t use the _unchecked variant for requests which have a reply X-Git-Tag: 4.0~14^2~11 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=52b3646ecc5a2d3399ddf52476c124b8cae588b2;p=i3%2Fi3 xcb: don’t use the _unchecked variant for requests which have a reply --- diff --git a/src/manage.c b/src/manage.c index 3636b1ad..06088a82 100644 --- a/src/manage.c +++ b/src/manage.c @@ -126,7 +126,7 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki values[0] = XCB_EVENT_MASK_PROPERTY_CHANGE; xcb_change_window_attributes(conn, window, XCB_CW_EVENT_MASK, values); -#define GET_PROPERTY(atom, len) xcb_get_property_unchecked(conn, false, window, atom, XCB_GET_PROPERTY_TYPE_ANY, 0, len) +#define GET_PROPERTY(atom, len) xcb_get_property(conn, false, window, atom, XCB_GET_PROPERTY_TYPE_ANY, 0, len) wm_type_cookie = GET_PROPERTY(A__NET_WM_WINDOW_TYPE, UINT32_MAX); strut_cookie = GET_PROPERTY(A__NET_WM_STRUT_PARTIAL, UINT32_MAX); diff --git a/src/x.c b/src/x.c index 55f447de..5136bf44 100644 --- a/src/x.c +++ b/src/x.c @@ -184,7 +184,7 @@ bool window_supports_protocol(xcb_window_t window, xcb_atom_t atom) { xcb_icccm_get_wm_protocols_reply_t protocols; bool result = false; - cookie = xcb_icccm_get_wm_protocols_unchecked(conn, window, A_WM_PROTOCOLS); + cookie = xcb_icccm_get_wm_protocols(conn, window, A_WM_PROTOCOLS); if (xcb_icccm_get_wm_protocols_reply(conn, cookie, &protocols, NULL) != 1) return false; diff --git a/src/xcb.c b/src/xcb.c index 298abd9c..545e2c60 100644 --- a/src/xcb.c +++ b/src/xcb.c @@ -254,7 +254,7 @@ void xcb_get_numlock_mask(xcb_connection_t *conn) { XCB_MOD_MASK_5 }; /* Request the modifier map */ - cookie = xcb_get_modifier_mapping_unchecked(conn); + cookie = xcb_get_modifier_mapping(conn); /* Get the keysymbols */ keysyms = xcb_key_symbols_alloc(conn);