We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1033

Summary: SDL_ShowCursor in Fullscreen
Product: SDL Reporter: zicodxx
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED ENDOFLIFE QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P1 CC: codepro
Version: 1.2.14   
Hardware: Other   
OS: Windows 7   

Description zicodxx 2010-07-28 12:53:52 UTC
Hey guys,

I am currently porting my app to Windows 7 and I encountered several problems regarding the mouse with SDL 1.2.14.

Here's one:
In my app I automatically hide the mouse cursor after a certain amount of time. If a mouse event is registered, the timer is set to 0. If it reaches 3 seconds, SDL_ShowCursor(SDL_DISABLE) is set.

On Linux this perfectly works (window and fullscreen). It also works on Windows 7 if the app runs in window mode.

In Fullscreen this happens:
- 3 seconds pass
- The mouse warps to center of screen when SDL_ShowCursor(SDL_DISABLE) is called
- 3 other seconds pass (I assume this warping is actually recognized as an event)
- Now the cursor hides

Now if I move the mouse, the cursor will re-appear again (on center of course) and the same procedure applies again.
Comment 1 Alex Volkov 2011-05-01 06:34:23 UTC
When you turn the cursor off with SDL_ShowCursor(SDL_DISABLE) in a fullscreen app, SDL goes into a mouse-relative mode automatically. In this mode, the windib driver moves the pointer to the center of your app every time you call SDL_PollEvent(). I do not know the exact reasons for this behavior, but I suspect it is done so that a game could receive mouse input w/o a visible pointer and no input would get lost due to the pointer position clipping at the screen edges.
Comment 2 Sam Lantinga 2011-12-29 01:27:41 UTC
Are you still seeing this with the latest SDL 1.2 snapshot?
http://www.libsdl.org/tmp/SDL-1.2.zip
Comment 3 Ryan C. Gordon 2011-12-30 01:25:47 UTC
Bumping priority on a few bugs that I would like examined more closely before 1.2.15 is finalized. This is not a promise that a bug will be fixed. We may close it with WONTFIX or WORKSFORME or something, but I just want to make sure attention is paid.

--ryan.
Comment 4 Ryan C. Gordon 2015-08-25 09:38:21 UTC
Hello, and sorry if you're getting several copies of this message by email, since we are closing many bugs at once here.

We have decided to mark all SDL 1.2-related bugs as RESOLVED ENDOFLIFE, as we don't intend to work on SDL 1.2 any further, but didn't want to mark a large quantity of bugs as RESOLVED WONTFIX, to clearly show what was left unattended to and make it easily searchable.

Our current focus is on SDL 2.0.

If you are still having problems with an ENDOFLIFE bug, your absolute best option is to move your program to SDL2, as it will likely fix the problem by default, and give you access to modern platforms and tons of super-cool new features.

Failing that, we _will_ accept small patches to fix these issues, and put them in revision control, although we do not intend to do any further official 1.2 releases.

Failing that, please feel free to contact me directly by email (icculus@icculus.org) and we'll try to find some way to help you out of your situation.

Thank you,
--ryan.