xcb_change_save_set(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

πŸ’– xcb_change_save_set β€” bestie, let's talk save sets πŸ’–

okay so this is a page from the XCB Requests corner of the xcb_change_save_set(3) manual, and honestly? It's a little chaotic but we're gonna get through it together. 🫢


✨ NAME ✨

xcb_change_save_set β€” changes a client's save set. That's it, that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

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

#include <xcb/xproto.h>

πŸ¦‹ Request function πŸ¦‹

Here's the function signature, copy it exactly bestie, character for character:

xcb_void_cookie_t xcb_change_save_set(xcb_connection_t *conn,
       uint8_t mode, xcb_window_t window);

πŸ’… REQUEST ARGUMENTS πŸ’…

  • conn β€” the XCB connection to X11. Your little lifeline to the server, periodt.
  • mode β€” one of these values, pick your fighter:
    • XCB_SET_MODE_INSERT β€” TODO: NOT YET DOCUMENTED. 😭 (the docs really said "figure it out", and I respect the honesty ngl)
    • XCB_SET_MODE_DELETE β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ (same energy, same mystery)
    • Insert to add the specified window to the save set, or Delete to delete it from the save set. That's the actual functional difference, lowkey.
  • window β€” the window to add or delete to/from your save set. The main character of this whole operation. πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

TODO: explain what the save set is for. (Yeah. The original manpage literally says that. Not me being lazy, that's canon. πŸ’€)

What we do know: this function either adds or removes the specified window to the client's (your application's) save set. So it's giving "either/or", it's giving binary, it's giving insert-or-delete. That's the whole move. ✨


πŸ“ RETURN VALUE πŸ“

It returns an xcb_void_cookie_t. Errors (if any) have to be handled in the event loop β€” so don't be out here ignoring your event loop, it's not a vibe. 🚫

If you want to handle errors directly with xcb_request_check instead, use xcb_change_save_set_checked. See xcb-requests(3) for details. iykyk. 🧚


πŸ”₯ ERRORS πŸ”₯

  • xcb_match_error_t β€” you created the specified window. Bestie. This does not make sense, you can only add windows created by other clients to your save set. Not your window, not your save set. πŸ™…β€β™€οΈ
  • xcb_value_error_t β€” you specified an invalid mode. The mode was not moding. 😭
  • xcb_window_error_t β€” the specified window does not exist. She's not real, she's gone, ghosted. πŸ‘»

🌈 SEE ALSO 🌈

xcb-requests(3), xcb_reparent_window(3) β€” go read these too, they're iconic in their own right. πŸ’œ


πŸ‘‘ AUTHOR πŸ‘‘

Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. They're literally asking for your feedback, so don't be shy. πŸŽ€


okay so real talk: this page has two big fat "TODO"s in it, and I'm not about to invent lore that isn't there. If the docs say TODO, I say TODO. Facts are facts, no cap. πŸ’―

and that's the whole page, bestie!! πŸ’– go forth and manage your save set responsibly. this was X Version 11, libxcb 1.17.0, and the page is xcb_change_save_set(3) β€” mwah, slay, bye!! βœ¨πŸ¦‹πŸŒΈ