The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Hiding the Cursor / Warp Mouse (SDL 1.3)
Daniel


Joined: 15 Feb 2011
Posts: 2
Location: Melbourne, Australia
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?
Hiding the Cursor / Warp Mouse (SDL 1.3)
Sam Lantinga


Joined: 10 Sep 2009
Posts: 1765
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! Smile

On Tue, Feb 15, 2011 at 6:23 PM, Daniel wrote:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org




--
    -Sam Lantinga, Founder and CEO, Galaxy Gameworks