SDL_ShowCursor issue

I’m working on a touchscreen application and wanted to hide the mouse
cursor, but the mouse position always gets corrupted, going to 0,0. has
anybody managed to hide the cursor but still use mouse coordinates?

I’m using full screen mode and openGL on windows.

Thanks,

John

SDL’s hide mouse shouldn’t reset or change the mouse position. What version
are you using?On Mon, Aug 23, 2010 at 1:53 PM, John Magnotti <john.magnotti at gmail.com>wrote:

I’m working on a touchscreen application and wanted to hide the mouse
cursor, but the mouse position always gets corrupted, going to 0,0. has
anybody managed to hide the cursor but still use mouse coordinates?

I’m using full screen mode and openGL on windows.

Thanks,

John


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

I’m using version 1.2, I don’t recall the minor version, can check later. If
it helps, I “fixed” the problem by calling SDL_WarpMouse(…) and sending
the mouse to the middle of the screen each time I got a timer event. I’m not
sure why it works, unless somehow the mouse points were getting messed up
and clipped to 0,0 (to avoid going negative or something). It may be
important that I’m using dual monitors, although the problem existed whether
I extended the viewport or duplicated it. I couldn’t test with just one
monitor b/c the setup requires that I run the software on my laptop and
people make responses on a separate touch-screen monitor.

JohnOn Mon, Aug 23, 2010 at 2:58 PM, Alex Barry <alex.barry at gmail.com> wrote:

SDL’s hide mouse shouldn’t reset or change the mouse position. What
version are you using?

On Mon, Aug 23, 2010 at 1:53 PM, John Magnotti <@John_Magnotti>wrote:

I’m working on a touchscreen application and wanted to hide the mouse
cursor, but the mouse position always gets corrupted, going to 0,0. has
anybody managed to hide the cursor but still use mouse coordinates?

I’m using full screen mode and openGL on windows.

Thanks,

John


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


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

Well, if your mouse is not in the window, SDL will generate the coordinates
0,0 for the mouse.
Otherwise, I would have to say that it is likely a programming error. My
suggestion would be to not hide the mouse and see if you get similar
results.On Mon, Aug 23, 2010 at 7:30 PM, John Magnotti <john.magnotti at gmail.com>wrote:

I’m using version 1.2, I don’t recall the minor version, can check later.
If it helps, I “fixed” the problem by calling SDL_WarpMouse(…) and sending
the mouse to the middle of the screen each time I got a timer event. I’m not
sure why it works, unless somehow the mouse points were getting messed up
and clipped to 0,0 (to avoid going negative or something). It may be
important that I’m using dual monitors, although the problem existed whether
I extended the viewport or duplicated it. I couldn’t test with just one
monitor b/c the setup requires that I run the software on my laptop and
people make responses on a separate touch-screen monitor.

John

On Mon, Aug 23, 2010 at 2:58 PM, Alex Barry <@Alex_Barry> wrote:

SDL’s hide mouse shouldn’t reset or change the mouse position. What
version are you using?

On Mon, Aug 23, 2010 at 1:53 PM, John Magnotti <john.magnotti at gmail.com>wrote:

I’m working on a touchscreen application and wanted to hide the mouse
cursor, but the mouse position always gets corrupted, going to 0,0. has
anybody managed to hide the cursor but still use mouse coordinates?

I’m using full screen mode and openGL on windows.

Thanks,

John


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


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


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

That is the weird part, if I don’t hide the cursor, everything works
fine. It may well be a programming issue, but I will probably stick to
just using WarpMouse until I have more time to dig out what is
happening. It’s just really weird that I can do the exact same thing
(i.e., execute the same touch responses on the touch screen) and it
only fails if I hide the cursor. Comment out the call and it works as
intended.

Thanks for your help, though.

JohnOn Mon, Aug 23, 2010 at 6:37 PM, Alex Barry <alex.barry at gmail.com> wrote:

Well, if your mouse is not in the window, SDL will generate the coordinates
0,0 for the mouse.
Otherwise, I would have to say that it is likely a programming error.? My
suggestion would be to not hide the mouse and see if you get similar
results.

On Mon, Aug 23, 2010 at 7:30 PM, John Magnotti <@John_Magnotti> wrote:

I’m using version 1.2, I don’t recall the minor version, can check later.
If it helps, I “fixed” the problem by calling SDL_WarpMouse(…) and sending
the mouse to the middle of the screen each time I got a timer event. I’m not
sure why it works, unless somehow the mouse points were getting messed up
and clipped to 0,0 (to avoid going negative or something). It may be
important that I’m using dual monitors, although the problem existed whether
I extended the viewport or duplicated it. I couldn’t test with just one
monitor b/c the setup requires that I run the software on my laptop and
people make responses on a separate touch-screen monitor.

John

On Mon, Aug 23, 2010 at 2:58 PM, Alex Barry <alex.barry at gmail.com> wrote:

SDL’s hide mouse shouldn’t reset or change the mouse position.? What
version are you using?

On Mon, Aug 23, 2010 at 1:53 PM, John Magnotti <@John_Magnotti> wrote:

I’m working on a touchscreen application and wanted to hide the mouse
cursor, but the mouse position always gets corrupted, going to 0,0. has
anybody managed to hide the cursor but still use mouse coordinates?
I’m using full screen mode and openGL on windows.
Thanks,
John


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


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


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


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