xcb_input_get_device_focus(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_input_get_device_focus πŸ’–

okay so bestie, welcome to xcb_input_get_device_focus(3) β€” a lil XCB request page from the XCB Requests crew. she's short, she's sweet, and honestly? half of her is just vibes and TODO: NOT YET DOCUMENTED. we love a mysterious queen. ✨


🌸 NAME 🌸

xcb_input_get_device_focus β€”

no like literally, that's it. the description line is empty. she said "my name is enough" and honestly? periodt. πŸ’…


✨ SYNOPSIS ✨

first things first, you gotta pull in the header:

#include <xcb/xinput.h

(okay it's #include <xcb/xinput.h>, i'm just being silly β€” the real one is right here πŸ‘‡)

#include <xcb/xinput.h>

πŸŽ€ Request function

xcb_input_get_device_focus_cookie_t
xcb_input_get_device_focus(xcb_connection_t *conn,
              uint8_t device_id);

πŸ¦‹ Reply datastructure

typedef struct xcb_input_get_device_focus_reply_t {
    uint8_t         response_type;
    uint8_t         xi_reply_type;
    uint16_t        sequence;
    uint32_t        length;
    xcb_window_t    focus;
    xcb_timestamp_t time;
    uint8_t         revert_to;
    uint8_t         pad0[15];
} xcb_input_get_device_focus_reply_t;

πŸ’œ Reply function

xcb_input_get_device_focus_reply_t
       *xcb_input_get_device_focus_reply(xcb_connection_t *conn,
              xcb_input_get_device_focus_cookie_t cookie,
              xcb_generic_error_t **e);

πŸ“ REQUEST ARGUMENTS πŸ“

  • conn β€” the XCB connection to X11. your lil hotline to the server, bestie. πŸ“ž
  • device_id β€” TODO: NOT YET DOCUMENTED. yeah. she's keeping secrets. no cap, the manpage literally just says that. πŸ™ˆ

🌈 REPLY FIELDS 🌈

  • response_type β€” the type of this reply, and in this case it's XCB_INPUT_GET_DEVICE_FOCUS. this field also lives in the xcb_generic_reply_t, so you can use it to tell your replies apart from each other. very "which one of y'all is this" energy. πŸ”₯
  • sequence β€” the sequence number of the last request the X11 server processed. her little timeline, her lore.
  • length β€” the length of the reply, in words. and a word here is 4 bytes, iykyk. ⭐
  • xi_reply_type β€” TODO: NOT YET DOCUMENTED.
  • focus β€” TODO: NOT YET DOCUMENTED.
  • time β€” TODO: NOT YET DOCUMENTED.
  • revert_to β€” TODO: NOT YET DOCUMENTED.
not four fields in a row being undocumented 😭 the mystery is the aesthetic, i guess. we stan a cryptic icon.

🌟 DESCRIPTION 🌟

...nothing here. the section exists, it's just empty. main character silence. 🀫✨


πŸ’« RETURN VALUE πŸ’«

she hands you back an xcb_input_get_device_focus_cookie_t. πŸͺ cute, right? but here's the thing β€” errors have to be handled when you call the reply function, xcb_input_get_device_focus_reply.

and if you'd rather handle errors in the event loop instead? use xcb_input_get_device_focus_unchecked. see xcb-requests(3) for the deets. 🫢


πŸ’€ ERRORS πŸ’€

this request does never generate any errors. zero. none. clean sheet, no drama, no red flags. iconic behaviour fr fr. πŸ‘‘


🧚 SEE ALSO 🧚

...it's empty, bestie. nothing linked here. she's solo. independent. thriving. πŸ¦‹


πŸ‘‘ AUTHOR πŸ‘‘

Generated from xinput.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. 🫢


and that's the whole page, bestie!! πŸ’– stay slaying, go get that device focus, and remember β€” X Version 11, libxcb 1.17.0, that's the vibe check. bye queen πŸŒΈβœ¨πŸŽ€