xcb_warp_pointer(3)
π xcb_warp_pointer β bestie, we're moving the mouse π
okay so this is xcb_warp_pointer, and it lives in the XCB Requests corner of the xcb_warp_pointer(3) manual. it does exactly one thing and it does it iconically: it moves the mouse pointer. periodt. π±οΈβ¨
β¨ NAME β¨
xcb_warp_pointer β move mouse pointer π¦
β¨ SYNOPSIS β¨
#include <xcb/xproto.h>
πΈ Request function πΈ
xcb_void_cookie_t xcb_warp_pointer(xcb_connection_t *conn,
xcb_window_t src_window, xcb_window_t dst_window, int16_t src_x,
int16_t src_y, uint16_t src_width, uint16_t src_height,
int16_t dst_x, int16_t dst_y);
β¨ REQUEST ARGUMENTS β¨
connβ the XCB connection to X11. your whole lil hotline to the server, no cap π«Άsrc_windowβ ifsrc_windowis notXCB_NONE(TODO), the move will only take place if the pointer is insidesrc_windowand within the rectangle specified by (src_x,src_y,src_width,src_height). the rectangle coordinates are relative tosrc_window. like, the pointer has to already be in the right zone for anything to happen πdst_windowβ ifdst_windowis notXCB_NONE(TODO), the pointer will be moved to the offsets (dst_x,dst_y) relative todst_window. ifdst_windowisXCB_NONE(TODO), the pointer will be moved by the offsets (dst_x,dst_y) relative to the current position of the pointer. two completely different vibes depending on which one you pick, choose wisely bestie πsrc_xβ TODO: NOT YET DOCUMENTED. πsrc_yβ TODO: NOT YET DOCUMENTED. πsrc_widthβ TODO: NOT YET DOCUMENTED. πsrc_heightβ TODO: NOT YET DOCUMENTED. πdst_xβ TODO: NOT YET DOCUMENTED. πdst_yβ TODO: NOT YET DOCUMENTED. π
not the TODO wall π the docs said "we'll get to it" and then never did. it's giving unfinished homework. but hey, the args are all still there, we're not skipping a single one π
β¨ DESCRIPTION β¨
Moves the mouse pointer to the specified position. that's it. that's the whole thing. main character behaviour honestly π
If src_window is not XCB_NONE (TODO), the move will only take place if the pointer is inside src_window and within the rectangle specified by (src_x, src_y, src_width, src_height). The rectangle coordinates are relative to src_window.
If dst_window is not XCB_NONE (TODO), the pointer will be moved to the offsets (dst_x, dst_y) relative to dst_window. If dst_window is XCB_NONE (TODO), the pointer will be moved by the offsets (dst_x, dst_y) relative to the current position of the pointer.
so basically: gatekeep the move with src_window, then decide where it lands with dst_window. the way that this function needs you to think about both windows at once... it's a lot but we're built for it π§
β¨ RETURN VALUE β¨
Returns an xcb_void_cookie_t. Errors (if any) have to be handled in the event loop. π
If you want to handle errors directly with xcb_request_check instead, use xcb_warp_pointer_checked. See xcb-requests(3) for details.
lowkey important: the plain version hands you a cookie and makes you go check the event loop yourself. the _checked one is the "just tell me right now" version. pick your fighter π
β¨ ERRORS β¨
xcb_window_error_tβ TODO: reasons? π
yeah. that's the whole error section. they really left us on read for this one π
β¨ SEE ALSO β¨
β¨ AUTHOR β¨
Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. π§
okay bestie that's the whole page, every flag, every TODO, every number, untouched, fr fr. this one's from X Version 11, libxcb 1.17.0, and it's the xcb_warp_pointer(3) page β go forth and warp responsibly, you absolute icon π
πΈβ¨
π¦ 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