XCB_SELINUX_GET_WINDOW_CONTEXT_CONTEXT(3)
π xcb_selinux_get_window_context β the XCB Requests era
okay bestie, gather round, because we're about to talk about xcb_selinux_get_window_context(3) from the XCB Requests cinematic universe and honestly? it's giving niche-but-important. no cap. π¦
β¨ NAME β¨
xcb_selinux_get_window_context β literally, the request that goes and gets the SELinux context for a window. that's it. that's the whole vibe. the original didn't even write a description here so we're all just standing here together in the void like π§βοΈ
πΈ SYNOPSIS πΈ
first things first, you gotta include the header:
#include <xcb/xselinux.h>
π Request function
xcb_selinux_get_window_context_cookie_t
xcb_selinux_get_window_context(xcb_connection_t *conn,
xcb_window_t window);
π Reply datastructure
typedef struct xcb_selinux_get_window_context_reply_t {
uint8_t response_type;
uint8_t pad0;
uint16_t sequence;
uint32_t length;
uint32_t context_len;
uint8_t pad1[20];
} xcb_selinux_get_window_context_reply_t;
π Reply function
xcb_selinux_get_window_context_reply_t
*xcb_selinux_get_window_context_reply(xcb_connection_t *conn,
xcb_selinux_get_window_context_cookie_t cookie,
xcb_generic_error_t **e);
π Reply accessors
char *xcb_selinux_get_window_context_context(const
xcb_selinux_get_window_context_request_t *reply);
int xcb_selinux_get_window_context_context_length(const
xcb_selinux_get_window_context_reply_t *reply);
xcb_generic_iterator_t xcb_selinux_get_window_context_context_end(const
xcb_selinux_get_window_context_reply_t *reply);
π REQUEST ARGUMENTS π
connβ your XCB connection to X11. the main character, the pipeline to the server, the whole reason we're here. πwindowβ TODO: NOT YET DOCUMENTED. yeah bestie, they really just left it like that. iconic honestly. not me defending the docs team though π
π REPLY FIELDS π
response_typeβ the type of this reply. in this specific case it'sXCB_SELINUX_GET_WINDOW_CONTEXT. this field also lives inside thexcb_generic_reply_t, so you can use it to tell your replies apart from each other when they're all stacked up like a group chat. πsequenceβ the sequence number of the last request processed by the X11 server. it's the receipts. keep track of it. π§Ύlengthβ the length of the reply, measured in words. and a word, for the record, is 4 bytes. math is math. βcontext_lenβ TODO: NOT YET DOCUMENTED. once again, no thoughts, head empty, just a field name sitting there. π
π¦ DESCRIPTION π¦
...and that's it. that's the section. it's empty. the description is a blank canvas and we are all just vibing in front of it. no notes. π¨
π RETURN VALUE π
it hands you back an xcb_selinux_get_window_context_cookie_t. cute, right? a little cookie. πͺ
but listen β errors have to be handled when you call the reply function xcb_selinux_get_window_context_reply. that's the deal.
if you'd rather handle errors in the event loop instead, use xcb_selinux_get_window_context_unchecked. see xcb-requests(3) for the details, iykyk.
π¨ ERRORS π¨
good news, bestie: this request does never generate any errors. not a single one. zero. she's unproblematic. β¨
π SEE ALSO π
(nothing here, she's mysterious, she's aloof, she references nobody)
π«Ά AUTHOR π«Ά
Generated from xselinux.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. if you find a typo, tell them, not me, i'm just the messenger. π
lowkey reminder:windowandcontext_lenare still marked TODO: NOT YET DOCUMENTED. so don't come for me, come for the xml. π
and that's a wrap, gorgeous. this page came from X Version 11, libxcb 1.17.0, and it ate, no crumbs left. periodt. π πβ
π¦ 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