Mouse coverage fix status? (Win32)

What’s the latest mouse coverage fix status for SDL under Win32? I saw some
mention of it back in October and it looks like its still there (app is not
informed when mouse goes outside client area.) I am putting in color cursor
support and it just kinda hangs around in the client area when the mouse
leaves the window :slight_smile:

  • Randi

Regimental Command
Generic Armored Combat System
http://www-users.cs.umn.edu/~relander/regcom/index.html

What’s the latest mouse coverage fix status for SDL under Win32? I saw some
mention of it back in October and it looks like its still there (app is not
informed when mouse goes outside client area.) I am putting in color cursor
support and it just kinda hangs around in the client area when the mouse
leaves the window :slight_smile:

No change. Nobody had a fix that didn’t have lots of overhead.

Submissions are happily accepted though. :slight_smile:

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Sam Lantinga wrote …

Randi Relander wrote …

What’s the latest mouse coverage fix status for SDL under Win32?
I saw some mention of it back in October and it looks like its still
there (app is not informed when mouse goes outside client area.)
I am putting in color cursor support and it just kinda hangs around
in the client area when the mouse leaves the window :slight_smile:

No change. Nobody had a fix that didn’t have lots of overhead.

There is an API function called TrackMouseEvent that handles both the mouse
leaving the window and the mouse hovering over the window. This is only
available in Windows 98 and NT 4.0 (and also on Window 95 with Internet
Explorer 5.0 installed.) It sets things up internally for generating
WM_MOUSEHOVER and WM_MOUSELEAVE messages. Looks like Microsoft saw the need
but was a little late with the implementation. Probably not worth messing
with.

Another area where this will cause problems is the typical web page
"highlighted button". If you have a rollover button highlighted and flick
the mouse off of the client area, the button is going to stay highlighted.
Since SDL_GetMouseState returns the internal static SDL_MouseX and
SDL_MouseY variables (which are modified by the mouse messages), you can’t
use that for polling outside the window either. Could SDL_GetAppState be
changed to use GetCursorPos and ScreenToClient to “calculate” a valid
SDL_APPMOUSEFOCUS state? I really don’t care if the event is queued, as long
as I can poll the state correctly.

  • Randi

Regimental Command
Generic Armored Combat System
http://www-users.cs.umn.edu/~relander/regcom/index.html

This turns out to be a MSDN FAQ item:
http://support.microsoft.com/support/kb/articles/q183/1/07.asp

I’ll be implementing this fix.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec