XRecolorCursor

Hi!
I want to recolor my Cursor:
SDL_SysWMinfo info1; /* Grab the window manager specific information
*/
static XColor fg = { 0, 0xffff , 0, 0 } ;
static XColor bg = { 0, 0 , 0xffff, 0 } ;
SDL_Cursor *mouse;
mouse=SDL_CreateCursor(data,mask,32,32,x,y);

if ( SDL_GetWMInfo(&info1) > 0 ) {
SDL_VERSION(&info1.version);

  info1.info.x11.lock_func();
  XRecolorCursor(info1.info.x11.display, mouse, &fg, &bg);
  info1.info.x11.unlock_func();

If i do that i get a big problem with the xlib:
X Error of failed request: BadCursor (invalid Cursor parameter)
Major opcode of failed request: 96 (X_RecolorCursor)
Resource id in failed request: 0x810830c
Serial number of failed request: 97
Current serial number in output stream: 97

What do i wrong?
Thx Fernando Benites

Hi!
I want to recolor my Cursor:
SDL_SysWMinfo info1; /* Grab the window manager specific information
*/
static XColor fg = { 0, 0xffff , 0, 0 } ;
static XColor bg = { 0, 0 , 0xffff, 0 } ;
SDL_Cursor *mouse;
mouse=SDL_CreateCursor(data,mask,32,32,x,y);

if ( SDL_GetWMInfo(&info1) > 0 ) {
SDL_VERSION(&info1.version);

  info1.info.x11.lock_func();
  XRecolorCursor(info1.info.x11.display, mouse, &fg, &bg);
  info1.info.x11.unlock_func();

If i do that i get a big problem with the xlib:
X Error of failed request: BadCursor (invalid Cursor parameter)

Yeah, that’s because the cursor structure returned by SDL_CreateCursor()
isn’t an X11 cursor. What you probably want to do is hack SDL to return
the current X cursor, if any, or allow you to set the foreground and
background colors.

You can always draw the cursor yourself, if you want a full color cursor.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment