xcb_kill_client(3)

πŸ“¦
version 1.17.0 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… NAME πŸ’…

xcb_kill_client β€” bestie, this one kills a client. Like, actually ends it.


✨ SYNOPSIS ✨

First things first, you gotta bring in the header, no cap:

#include <xcb/xproto.h>

πŸŽ€ Request function πŸŽ€

xcb_void_cookie_t xcb_kill_client(xcb_connection_t *conn,
       uint32_t resource);

πŸ¦‹ REQUEST ARGUMENTS πŸ¦‹

  • conn β€” the XCB connection to X11, aka your whole link to the server. Your main character connection, honestly.
  • resource β€” literally any resource that belongs to the client (a Window is the classic example) and it gets used to figure out which client connection you're talking about. So it's not really about the resource itself, it's about whose it is. iykyk.

And okay, plot twist: there's a special value, XCB_KILL_ALL_TEMPORARY. When you pass that one in, the resources of all clients that have terminated in RetainTemporary (TODO) get destroyed. Yes, the original really does say (TODO) there. We don't make the rules. πŸ™ˆ


🌸 DESCRIPTION 🌸

It forces a close down of the client that created the specified resource. That's it, that's the whole thing. You point at something that client owns, and boom β€” that connection is getting shut down, whether it's emotionally ready or not. πŸ’€


πŸ’– RETURN VALUE πŸ’–

You get back an xcb_void_cookie_t. Noted: it's a void cookie, so the interesting stuff isn't in the return value.

Errors (if any happen) have to be handled in the event loop. That's the vibe, that's how it works.

But if you'd rather handle errors directly with xcb_request_check, then use xcb_kill_client_checked instead. See xcb-requests(3) for the details, it's all laid out there.


πŸ”₯ ERRORS πŸ”₯

  • xcb_value_error_t β€” the specified resource does not exist. You tried to reference something that isn't there. Iconic mistake, happens to everyone, but yeah β€” that's the error. 🫢

🌈 SEE ALSO 🌈


πŸ‘‘ AUTHOR πŸ‘‘

This page was generated from xproto.xml. Contact xcb@lists.freedesktop.org if you've got corrections or improvements to send their way. They want the feedback, fr fr.


πŸ’œ And that's a wrap on the xcb_kill_client(3) page from the XCB Requests family. This lovely little manual ships with X Version 11, libxcb 1.17.0. Now go forth and kill clients responsibly, bestie. βœ¨πŸ’…πŸŽ€