XRecolorCursor can generate a BadCursor error. The XFreeCursor function deletes the association between the cursor resource ID and the specified cursor. The cursor storage is freed when no other resource references it. The specified cursor ID should not be referred to again. XFreeCursor can generate a BadCursor error.
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. XQueryBestCursor can generate a BadDrawable error. BadDrawable A value for a Drawable argument does not name a defined Window or Pixmap.