Status XQueryBestCursor(display, d, width, height, width_return, height_return)
      Display *display;
      Drawable d;
      unsigned int width, height;
      unsigned int *width_return, *height_return;


display Specifies the connection to the X server.
d Specifies the drawable, which indicates the screen.
height Specify the width and height of the cursor that you want the size information for.
height_return Return the best width and height that is closest to the specified width and height.


Some displays allow larger cursors than other displays. The XQueryBestCursor() function provides a way to find out what size cursors are actually possible on the display. It returns the largest size that can be displayed. Applications should be prepared to use smaller cursors on displays that cannot support large ones.

XQueryBestCursor() can generate a BadDrawable error.


BadDrawable A value for a Drawable argument does not name a defined Window or Pixmap.

See also

XCreateColormap() XCreateFontCursor(), XDefineCursor(), XFreeCursor(), XRecolorCursor(), "Creating, Recoloring, and Freeing Cursors".
Christophe Tronche, [email protected]