The easiest way to use themed cursors is with the Xcursor library.
#include <X11/Xcursor/Xcursor.h>
...
Cursor c = XcursorLibraryLoadCursor(dpy, "sb_v_double_arrow");
XDefineCursor (dpy, w, c);
The names are standard cursor names from X11/cursorfont.h
, sans XC_
. If the theme has extra cursors such as bd_double_arrow
, these names can also be used (but not all themes have them!)
If a theme does not have a replacement for some core X cursor, the library will fall back to the core cursor.