XDefineCursor(3)
π XDefineCursor(3) β define cursors π
okay bestie, welcome to the XLIB FUNCTIONS manual page for XDefineCursor and XUndefineCursor, the two functions that handle your window cursor situation. Itβs giving βset the vibe, or undo the vibeβ and honestly? iconic. π
πΈ NAME πΈ
XDefineCursor, XUndefineCursor β define cursors β¨
π¦ SYNTAX π¦
int XDefineCursor(Display *display, Window w, Cursor cursor);
int XUndefineCursor(Display *display, Window w);
π ARGUMENTS π
cursorβ Specifies the cursor that is to be displayed orNone.displayβ Specifies the connection to the X server.wβ Specifies the window.
π DESCRIPTION π
If a cursor is set, it will be used when the pointer is in the window. If the cursor is None, it is equivalent to XUndefineCursor. no cap, thatβs the whole rule π
XDefineCursor can generate BadCursor and BadWindow errors. so likeβ¦ keep an eye on that, bestie π
The XUndefineCursor function undoes the effect of a previous XDefineCursor for this window. When the pointer is in the window, the parentβs cursor will now be used. On the root window, the default cursor is restored. periodt. β¨
XUndefineCursor can generate a BadWindow error.
bestie moment:XDefineCursorcan throwBadCursorandBadWindow;XUndefineCursorcan throwBadWindow. those are the error girlies to know about π
π DIAGNOSTICS π
BadAllocβ The server failed to allocate the requested resource or server memory.BadCursorβ A value for aCursorargument does not name a definedCursor.BadWindowβ A value for aWindowargument does not name a definedWindow.
π«Ά SEE ALSO π«Ά
XCreateFontCursor(3)XRecolorCursor(3)Xlib - C Language X Interface
π signing off from X Version 11, libX11 1.8.14 β itβs the XDefineCursor(3) page, and the footer didnβt include a date so Iβm not gonna invent one, bestie. love u, bye π§ββοΈβ¨
π¦ 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