xcb_free_cursor(3)
π xcb_free_cursor β the XCB Requests era, section 3
okay so bestie, welcome to xcb_free_cursor, a lil function from the XCB Requests corner of the universe (that's section 3 of the manual, iykyk). it's short, it's sweet, and it's here to help you say bye-bye to a cursor. π
β¨ NAME β¨
xcb_free_cursor β deletes a cursor. that's it. that's the whole job. π¦
πΈ SYNOPSIS πΈ
first things first, you gotta include the header, no cap:
#include <xcb/xproto.h>
π«Ά Request function π«Ά
here's the signature, copy it exactly, don't be cute with it:
xcb_void_cookie_t xcb_free_cursor(xcb_connection_t *conn,
xcb_cursor_t cursor);
π REQUEST ARGUMENTS π
connβ the XCB connection to X11. it's your lil hotline to the X server, your main character link-up. πcursorβ the cursor you want to destroy. yes, destroy. we're not being gentle about it. π
π DESCRIPTION π
okay so what does it actually do? it deletes the association between the cursor resource ID and that specific cursor you handed over. the way that works is lowkey elegant: the cursor doesn't get yeeted the second you ask β it gets freed once no other resource references it. so if other stuff is still holding onto it, it stays. iconic resource-management behaviour, honestly. β¨
β RETURN VALUE β
you get back an xcb_void_cookie_t. that's your lil receipt. π§Ύ
and here's the thing β errors (if there are any) have to be handled in the event loop. not right here, not right now. event loop. periodt.
if you'd rather handle errors directly with xcb_request_check instead, then use xcb_free_cursor_checked. see xcb-requests(3) for the details, bestie. π
π ERRORS π
xcb_cursor_error_tβ the specified cursor does not exist. yeah. you tried to free a cursor that isn't real. it's giving imaginary friend energy. π
π₯ SEE ALSO π₯
π§ AUTHOR π§
generated from xproto.xml. contact xcb@lists.freedesktop.org for corrections and improvements β they're the ones who actually know things, fr fr.
and that's the whole page, bestie!! this lil gem ships with libxcb 1.17.0, part of X Version 11 β slay, ate, no crumbs left. go forth and free those cursors responsibly. π«Άβ¨π
π¦ where this page comes from
- alpine 3.22: libxcb-doc 1.17.0-r0 Β· MIT
- alpine 3.23: libxcb-doc 1.17.0-r1 Β· MIT
- alpine 3.24: libxcb-doc 1.17.0-r2 Β· MIT
- arch rolling: libxcb 1.17.0-1 Β· X11
- centos-stream 10: libxcb-devel 1.17.0-3.el10 Β· X11
- debian trixie: libxcb-doc 1.17.0-2
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- nixpkgs unstable: libxcb 1.17.0
- opensuse-leap 16.0: libxcb-devel-doc 1.17.0-160000.2.2 Β· MIT
- ubuntu questing: libxcb-doc 1.17.0-2build1
- ubuntu resolute: libxcb-doc 1.17.0-2ubuntu1
- ubuntu stonking: libxcb-doc 1.17.0-2ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms