libwm

library for X windows manipulations
git clone git://z3bra.org/libwm
Log | Files | Refs | LICENSE

commit a43614c6a4f9f8e59697ab76cab14407082a6bfc
parent 6feb73742a86509543be40d95e611c0a459f526c
Author: Willy Goiffon <dev@z3bra.org>
Date:   Thu, 31 Oct 2019 08:26:59 +0100

wm_set_atom(): return XCB error code in case of error

Diffstat:
libwm.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libwm.c b/libwm.c @@ -197,6 +197,7 @@ wm_add_atom(xcb_atom_t type, char *name, size_t len) int wm_set_atom(xcb_window_t wid, xcb_atom_t atom, xcb_atom_t type, size_t len, void *data) { + int errcode; xcb_void_cookie_t c; xcb_generic_error_t *e; @@ -204,11 +205,12 @@ wm_set_atom(xcb_window_t wid, xcb_atom_t atom, xcb_atom_t type, size_t len, void wid, atom, type, 32, len, data); e = xcb_request_check(conn, c); if (!e) - return -1; + return 0; + errcode = e->error_code; free(e); - return 0; + return errcode; } void *