Absolute + SDL_WM_GrabInput

Should absolute mouse coordinates be affected by SDL_WM_GrabInput? If I grab
the input in Win32 windowed mode, the mouse button events warp the absolute
coodinates to the center of the window. SDL was doing this in DirectX
fullscreen for a while but I noticed that it recently stopped doing it. It
looks like a problem in the mouse button event handlers in
wincommon/SDL_sysevents.c (which are not used in DirectX fullscreen.) I can
fix it easy enough but just wanted to verify that the absolute coordinates
should not be affected by the grab state. Is this is only a Win32 issue?

  • Randi

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

Should absolute mouse coordinates be affected by SDL_WM_GrabInput? If I grab
the input in Win32 windowed mode, the mouse button events warp the absolute
coodinates to the center of the window. SDL was doing this in DirectX
fullscreen for a while but I noticed that it recently stopped doing it. It
looks like a problem in the mouse button event handlers in
wincommon/SDL_sysevents.c (which are not used in DirectX fullscreen.) I can
fix it easy enough but just wanted to verify that the absolute coordinates
should not be affected by the grab state. Is this is only a Win32 issue?

Yes, absolute coordinates should not be affected by the grab state. I should
have some logic in there that returns relative coordinates when doing warping,
which may have gotten missed.

Let me know if you have a patch.

Thanks!
-Sam Lantinga (slouken at devolution.com)

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