XkbSASetScreen(3)
β¨ XkbSASetScreen β the libX11 glow-up β¨
okay so bestie, welcome to XkbSASetScreen(3) from the XKB FUNCTIONS corner of the universe π
this one's a tiny little setter function and she's honestly iconic for it.
πΈ NAME πΈ
XkbSASetScreen β sets the screenXXX field of act from s. that's it. that's the whole job. slay π
π¦ SYNOPSIS π¦
void XkbSASetScreen (XkbSwitchScreenAction act, int s);
π ARGUMENTS π
actβ the action where we're gonna setscreenXXX, bestie. that's the target π―sβ the value we're stuffing intoscreenXXX, no cap β¨
π DESCRIPTION π
okay so picture this: actions tied to the XkbSwitchScreen action structure are the ones that change the active screen on a multiscreen display. multitasking queen behavior, honestly π₯οΈβ¨
the type field of the XkbSwitchScreenAction structure should always be XkbSA_SwitchScreen. like, always always. that's her whole identity π«Ά
the flags field? she's built from the bitwise inclusive OR of the masks in Table 1, which I'm serving to you right here π
β Table 1 β Switch Screen Action Flags β
XkbSA_SwitchAbsoluteβ if this is set, thescreenXXXfield represents the index of the new screen. if it's not set, then it represents an offset from the current screen to the new screen. absolute queen vs. relative queen, pick your fighter πXkbSA_SwitchApplicationβ if this is not set, the action should switch to another screen on the same server. if it is set, it should switch to another X server or application that shares the same physical display. crossing over into someone else's server, we love a collab π
and the screenXXX field itself? she's a signed character value that represents either the relative or absolute screen index, depending on the state of the XkbSA_SwitchAbsolute bit in the flags field. so like, the vibes of that one bit decide everything for her π
Xkb provides the following macros to convert between the integer and signed character value for screen numbers in XkbSwitchScreenAction structures. yes bestie, there are little conversion macros and they are doing the lord's work π§
π STRUCTURES π
typedef struct _XkbSwitchScreenAction {
unsigned char type; /* XkbSA_SwitchScreen */
unsigned char flags; /* controls screen switching */
char screenXXX; /* screen number or delta */
} XkbSwitchScreenAction;
look at her. three fields. immaculate. no notes π
π NOTES π
heads up bestie, this action is optional. servers are totally free to ignore the action or any of its flags if they don't support the requested behavior. rude, but legal π
and if the action is ignored, it behaves like XkbSA_NoAction. otherwise, key press and key release events do not generate an event. so like, don't go looking for an event that isn't coming, fr fr π
π sign-off π
this whole page is straight from X Version 11, libX11 1.8.14, and it's the XkbSASetScreen(3) page β go forth and set that screenXXX field, bestie. you're gonna ate π«Άπβ¨
π¦ where this page comes from
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- Copyright (c) 1999, Oracle and/or its affiliates
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms