SDL_ShowCursor(0) causes incorrect mouse event reporting?

In SDL 1.2.9 (on Ubuntu Dapper Drake), calling SDL_ShowCursor(0) will
cause mouse events to be reported with incorrect coordinates.

It looks like the relative coordinates in the event structure are actually
the absolute coordinates (relative to the screen, not the window) and this
ends up causing havoc for everything else (like SDL_GetRelativeMouseState()).

Is anyone else seeing this? I can work around this by just using a
transparent cursor instead of calling SDL_ShowCursor…

Regards,

Anthony Liguori

El lun, 06-03-2006 a las 20:17 -0600, Anthony Liguori escribi?:

In SDL 1.2.9 (on Ubuntu Dapper Drake), calling SDL_ShowCursor(0) will
cause mouse events to be reported with incorrect coordinates.

It looks like the relative coordinates in the event structure are actually
the absolute coordinates (relative to the screen, not the window) and this
ends up causing havoc for everything else (like SDL_GetRelativeMouseState()).

Is anyone else seeing this? I can work around this by just using a
transparent cursor instead of calling SDL_ShowCursor…

I’ve seen a problem that may match your description (I never debugged
it), it only happens in fullscreen mode. Windowed seems to work fine. Do
you see that?

--Gabriel

El lun, 06-03-2006 a las 20:17 -0600, Anthony Liguori escribi?:

In SDL 1.2.9 (on Ubuntu Dapper Drake), calling SDL_ShowCursor(0) will
cause mouse events to be reported with incorrect coordinates.

It looks like the relative coordinates in the event structure are actually
the absolute coordinates (relative to the screen, not the window) and this
ends up causing havoc for everything else (like SDL_GetRelativeMouseState()).

Is anyone else seeing this? I can work around this by just using a
transparent cursor instead of calling SDL_ShowCursor…

I’ve seen a problem that may match your description (I never debugged
it), it only happens in fullscreen mode. Windowed seems to work fine. Do
you see that?

Actually, attempting to reproduce this on a vanilla SDL, it seems to be a
problem specific to the Ubuntu packages. Sorry for the noise, I’ll follow
up with the Ubuntu maintainers to get this resolved.

Regards,

Anthony LiguoriOn Tue, 07 Mar 2006 21:52:01 -0300, Gabriel Gambetta wrote:

–Gabriel


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

Actually, attempting to reproduce this on a vanilla SDL, it seems to be a
problem specific to the Ubuntu packages. Sorry for the noise, I’ll follow
up with the Ubuntu maintainers to get this resolved.

Also try it with SDL from CVS:
http://www.libsdl.org/cvs/SDL-1.2.tar.gz

Thanks!
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment