Using the X11 cursor in an application

Hello All,

How can I get an SDL application to use the default cursor of the
current machine. For instance, an animated cursor in X11 version
4. Portability is not a concern for this application. Any help
is greatly appreciated.–
@Chris_Cera http://www.cs.drexel.edu/~cera

Hello All,

How can I get an SDL application to use the default cursor of the
current machine. For instance, an animated cursor in X11 version
4. Portability is not a concern for this application. Any help
is greatly appreciated.

You can modify SDL not to create a custom cursor, if portabillity is not
an issue.

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

Sam: Thanks for your prompt response.

Rather than use the X4 cursor for animation … I redid it using a
library called SDLSprite. This involved some manipulation using
gimp and other things in order to tune the images given by the
graphic designer. It wasn’t hard to use, but if something better
exists I’d appreciate any feedback.

I would have rather used the method suggested by Sam, could
somebody point me to a “minimal working example” if one exists?
Or the file I should start hacking within the SDL source. I’m
very new to SDL, but not OpenGL. Any help is greatly appreciated.
Thanks again.

  • Sam Lantinga [030731 23:54]:> > Hello All,

How can I get an SDL application to use the default cursor of the
current machine. For instance, an animated cursor in X11 version
4. Portability is not a concern for this application. Any help
is greatly appreciated.

You can modify SDL not to create a custom cursor, if portabillity is not
an issue.

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


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


@Chris_Cera http://www.cs.drexel.edu/~cera

I would have rather used the method suggested by Sam, could
somebody point me to a “minimal working example” if one exists?
Or the file I should start hacking within the SDL source. I’m
very new to SDL, but not OpenGL. Any help is greatly appreciated.
Thanks again.

Take a look at src/video/SDL_cursor.c

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