XChangePointerControl(3)
π
XChangePointerControl(3) β the XLIB FUNCTIONS girlies
okay so bestie, welcome to the manual page for XChangePointerControl and XGetPointerControl, two of the most underrated little functions in XLIB FUNCTIONS land. their whole job? literally controlling pointer behavior. that's the vibe. pointer acceleration, pointer threshold, the whole thing. no cap. π±οΈβ¨
β¨ SYNTAX β¨
like, here's exactly how you call them, character for character, don't @ me:
int XChangePointerControl(Display *display, Bool do_accel, Bool
do_threshold, int accel_numerator, int accel_denominator, int
threshold);
int XGetPointerControl(Display *display, int *accel_numerator_return,
int *accel_denominator_return, int *threshold_return);
π ARGUMENTS π
every single one, bestie, we're not skipping a single one:
accel_denominatorβ specifies the denominator for the acceleration multiplier. yes girl, the bottom of the fraction πaccel_denominator_returnβ returns the denominator for the acceleration multiplier. it's the same thing but it's giving output parameter, y'know?accel_numeratorβ specifies the numerator for the acceleration multiplier. the top half, the main character of the fraction β¨accel_numerator_returnβ returns the numerator for the acceleration multiplier. matching set, we love a duo π«Άdisplayβ specifies the connection to the X server. the link, the connection, the situationship with your X server πdo_accelβ specifies a Boolean value that controls whether the values for theaccel_numeratororaccel_denominatorare used. it's a yes/no gate, so iconic of itdo_thresholdβ specifies a Boolean value that controls whether the value for thethresholdis used. another gate, another slay πͺthresholdβ specifies the acceleration threshold. the pixel count that decides when the magic kicks inthreshold_returnβ returns the acceleration threshold. the read-back version πΈ
π DESCRIPTION π
so XChangePointerControl defines how the pointing device moves. that's the whole assignment, bestie. the acceleration, expressed as a fraction, is a multiplier for movement. for example, specifying 3/1 means the pointer moves three times as fast as normal. THREE TIMES. fast af. π₯
and here's the tea: the fraction may be rounded arbitrarily by the X server. so don't come crying to me if your 7/3 becomes something else, the server does what it wants, it's giving main character energy on its own terms.
acceleration only takes effect if the pointer moves more than threshold pixels at once, and it only applies to the amount beyond the value in the threshold argument. so like, it's not retroactive, it's selective. we stan a selective queen. π
setting a value to -1 restores the default. that's the reset button, the "never mind, back to factory settings" of it all.
the values of the do_accel and do_threshold arguments must be True for the pointer values to be set, or the parameters are unchanged. literally the gates have to be open or nothing happens, that's just how it is. π
β οΈ negative values (other than-1) generate aBadValueerror, as does a zero value for theaccel_denominatorargument. so like,-1is cute and fine,-47is not. and dividing by zero? absolutely not, we do not do that here, that's aBadValuetoo. π
XChangePointerControl can generate a BadValue error. periodt.
and then we have XGetPointerControl, which returns the pointer's current acceleration multiplier and acceleration threshold. it's the little sister who just tells you what's going on. no changing, just reporting. honest queen. π¦
π DIAGNOSTICS π
BadValueβ some numeric value falls outside the range of values accepted by the request. unless a specific range is specified for an argument, the full range defined by the argument's type is accepted. any argument defined as a set of alternatives can generate this error. so basically, if the number's out of pocket, you get this. no cap. β
π SEE ALSO π
Xlib - C Language X Interfaceβ the big book, the source text, the required reading. iykyk π
okay that's the whole page bestie, go forth and accelerate your pointer responsibly π
this little gem came to you courtesy of X Version 11 and libX11 1.8.14, and like, huge shoutout to the XChangePointerControl(3) page for being the moment. mwah. ππ§ββοΈ
π¦ 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
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms