XISETCLIENTPOINTER(3)

πŸ’… XISETCLIENTPOINTER(3) β€” the girlies' guide to XISetClientPointer and XIGetClientPointer πŸ’…

okay so bestie, picture this: you're deep in X land, manual section 3 (library calls, the iconic section), and you need to know who the core pointer is perceiving to be, like, the pointer. That's this page. Setting it, getting it, all of it. Let's go. πŸŽ€


✨ NAME ✨

XISetClientPointer, XIGetClientPointer β€” set or get the ClientPointer device. That's it, that's the whole vibe. πŸ’–


🌸 SYNOPSIS 🌸

#include <X11/extensions/XInput2.h>

XISetClientPointer( Display *display,
                    Window win,
                    int deviceid);

Bool XIGetClientPointer( Display *display,
                         Window win,
                         int *device);

the little argument besties 🫢

  • display β€” the connection to the X server, obviously. your whole link to the server, your main character connection. πŸ”₯
  • win β€” a window belonging to the client. and lowkey? it may be None. yes really. πŸ™ˆ
  • deviceid β€” the ClientPointer device you're specifying. the one you picked. πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the ClientPointer? it's the device that is perceived to be the core pointer for non-XI protocol requests and replies. Every single time a protocol message needs device-dependent data and the device is not explicitly given, the ClientPointer device is used to obtain that data. For example β€” and this is the example, no cap β€” a XQueryPointer request will return the coordinates of the ClientPointer. slay. ✨

The XISetClientPointer request sets the ClientPointer device for the client that owns the given window. If win is None, the requesting client's ClientPointer is set to the device specified with deviceid. Only master pointer devices can be set as ClientPointer. that's the rule, periodt. πŸ‘‘

XISetClientPointer and can generate a BadDevice and a BadWindow error. (yes, the original says "and can", we're keeping it exactly like that, character for character, no editing bestie πŸ’–)

The XIGetClientPointer request returns the ClientPointer's device ID for the client that owns the given window. If win is None, the requesting client's ClientPointer is returned. easy. πŸ“

win may be a client ID instead of a window. plot twist, but make it useful. 🧚

XIGetClientPointer can generate a BadWindow error. just the one. πŸ’€


πŸ’œ DIAGNOSTICS πŸ’œ

  • BadDevice β€” an invalid device was specified. The device does not exist or is not a master pointer device. so if you're trying to set some non-master-pointer rando as your ClientPointer? no. nope. not today. 😭
  • BadWindow β€” a value for a Window argument does not name a defined window. the window said "i don't exist" and honestly? rude. 🌈

fr fr: if you're setting a ClientPointer, check it's a master pointer device first, or BadDevice is gonna come for you. not me being dramatic, that's just the manpage. πŸ’…

πŸ‘‘ SEE YOU, BESTIE πŸ‘‘

this page is living in manual section 3, and the footer said 05/18/2026 with XISETCLIENTPOINTER(3) stamped on it β€” so that's the date and the source/version tag, shouted out at the very end like the icons they are. mwah. πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from