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;
|
||||
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);
|
||||
|
|
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;
|
||||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue