Hiding the Cursor / Warp Mouse (SDL 1.3)

I’ve been unable to hide the mouse cursor (properly) using SDL. I am using Ubuntu 10.10 and have been using the following:

SDL_ShowCursor( SDL_DISABLE ); 
SDL_WarpMouse( x, y ); 

Neither of which function properly at all; it would appear to have no visual effect, there is however a triggered mouse motion event as the documentation states, but the mouse does not move in any or disappear on screen.

The SDL Window is created (via SDL_CreateWindow) with the flags SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN. Fullscreen has no effect on the outcome.

Running the window at low resolutions in fullscreen mode (such as 640x480), does provide the desired effect of the commands; but the cursor bleeds through from the underlying windows.
Around 1024x768, it has a completely different cursor icon.
As I get higher in resolution, it stops bleeding through and just acts as though its a window (the Gnome cursor). With no effect of above commands.

Any ideas?

Yes, cursors are not yet implemented in SDL 1.3. I’m sort of intentionally
leaving them unimplemented as a reminder that 1.3 isn’t ready yet.

However, as soon as I finish my fullscreen work I’ll be working on them, so
soon now! :)On Tue, Feb 15, 2011 at 6:23 PM, Daniel wrote:

I’ve been unable to hide the mouse cursor (properly) using SDL. I am
using Ubuntu 10.10 and have been using the following:

SDL_ShowCursor( SDL_DISABLE );
SDL_WarpMouse( x, y );

Neither of which function properly at all; it would appear to have no
visual effect, there is however a triggered mouse motion event as the
documentation states, but the mouse does not move in any or disappear on
screen.

The SDL Window is created (via SDL_CreateWindow) with the flags
SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN. Fullscreen has no effect on the
outcome.

Running the window at low resolutions in fullscreen mode (such as 640x480),
does provide the desired effect of the commands; but the cursor bleeds
through from the underlying windows.
Around 1024x768, it has a completely different cursor icon.
As I get higher in resolution, it stops bleeding through and just acts as
though its a window (the Gnome cursor). With no effect of above commands.

Any ideas?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and CEO, Galaxy Gameworks