xcb: don’t use the _unchecked variant for requests which have a reply
This commit is contained in:
parent
7f3f7c26b6
commit
52b3646ecc
|
@ -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;
|
values[0] = XCB_EVENT_MASK_PROPERTY_CHANGE;
|
||||||
xcb_change_window_attributes(conn, window, XCB_CW_EVENT_MASK, values);
|
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);
|
wm_type_cookie = GET_PROPERTY(A__NET_WM_WINDOW_TYPE, UINT32_MAX);
|
||||||
strut_cookie = GET_PROPERTY(A__NET_WM_STRUT_PARTIAL, UINT32_MAX);
|
strut_cookie = GET_PROPERTY(A__NET_WM_STRUT_PARTIAL, UINT32_MAX);
|
||||||
|
|
2
src/x.c
2
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;
|
xcb_icccm_get_wm_protocols_reply_t protocols;
|
||||||
bool result = false;
|
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)
|
if (xcb_icccm_get_wm_protocols_reply(conn, cookie, &protocols, NULL) != 1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -254,7 +254,7 @@ void xcb_get_numlock_mask(xcb_connection_t *conn) {
|
||||||
XCB_MOD_MASK_5 };
|
XCB_MOD_MASK_5 };
|
||||||
|
|
||||||
/* Request the modifier map */
|
/* Request the modifier map */
|
||||||
cookie = xcb_get_modifier_mapping_unchecked(conn);
|
cookie = xcb_get_modifier_mapping(conn);
|
||||||
|
|
||||||
/* Get the keysymbols */
|
/* Get the keysymbols */
|
||||||
keysyms = xcb_key_symbols_alloc(conn);
|
keysyms = xcb_key_symbols_alloc(conn);
|
||||||
|
|
Loading…
Reference in New Issue