Push scrolling with visible cursor

It appears from experimentation that SDL_GetRelativeMouseState returns a delta that is clamped with respect to the screen extents if the cursor is being shown.
Is this the designed behavior? And if so, is there any way to both show the cursor and detect mouse movements that are discarded at the window edge?

Thanks,
Matthew_________________________________________________________________
Send e-mail faster without improving your typing skills.
http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008

When the cursor is shown, the cursor is under the control of the
windowing environment. In theory this means that the window manager
might choose to interfere somehow (will all windowing environments
volunteer information about where your mouse is traveling to a process
not owning the windows over which the mouse is doing its movement?) In
many cases, all mouse motion while depressing a mouse button belongs
to the window within which the button depression occurred.

In reality though, it looks like SDL might be the culprit. Here is an
excerpt from SDL_mouse.c near line 147:

/* If not relative mode, generate relative motion from clamped X/Y.
This prevents lots of extraneous large delta relative motion when
the screen is windowed mode and the mouse is outside the window.
*/
if ( ! relative ) {
Xrel = X-SDL_MouseX;
Yrel = Y-SDL_MouseY;
}

The comment seems to agree with what I said earlier about not
necessarily having access to full mouse motion data outside the window
(at least under certain circumstances.) But I’m not really sure if
it’s necessary that it be this way. If you have any comments on the
subject, please share.On Thu, Dec 11, 2008 at 11:24 AM, Matthew Blank wrote:

It appears from experimentation that SDL_GetRelativeMouseState returns a
delta that is clamped with respect to the screen extents if the cursor is
being shown.
Is this the designed behavior? And if so, is there any way to both show the
cursor and detect mouse movements that are discarded at the window edge?

Thanks,
Matthew


Send e-mail faster without improving your typing skills. Get your Hotmail®
account.


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


http://codebad.com/

Does SDL also clamp absolute mouse positions under any circumstances?
I seem to recall that it might have under one platform, but it’s been
at least a year since the time I believe I observed this behavior.On Thu, Dec 11, 2008 at 3:38 PM, Donny Viszneki <@Donny_Viszneki> wrote:

When the cursor is shown, the cursor is under the control of the
windowing environment. In theory this means that the window manager
might choose to interfere somehow (will all windowing environments
volunteer information about where your mouse is traveling to a process
not owning the windows over which the mouse is doing its movement?) In
many cases, all mouse motion while depressing a mouse button belongs
to the window within which the button depression occurred.

In reality though, it looks like SDL might be the culprit. Here is an
excerpt from SDL_mouse.c near line 147:

/* If not relative mode, generate relative motion from clamped X/Y.
This prevents lots of extraneous large delta relative motion when
the screen is windowed mode and the mouse is outside the window.
*/
if ( ! relative ) {
Xrel = X-SDL_MouseX;
Yrel = Y-SDL_MouseY;
}

The comment seems to agree with what I said earlier about not
necessarily having access to full mouse motion data outside the window
(at least under certain circumstances.) But I’m not really sure if
it’s necessary that it be this way. If you have any comments on the
subject, please share.

On Thu, Dec 11, 2008 at 11:24 AM, Matthew Blank wrote:

It appears from experimentation that SDL_GetRelativeMouseState returns a
delta that is clamped with respect to the screen extents if the cursor is
being shown.
Is this the designed behavior? And if so, is there any way to both show the
cursor and detect mouse movements that are discarded at the window edge?

Thanks,
Matthew


Send e-mail faster without improving your typing skills. Get your Hotmail®
account.


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


http://codebad.com/


http://codebad.com/

The behavior I’m observing (on XP) is:

  • SDL_GetMouseState() returns the position clamped to screen extents - whether the cursor is hidden or not you always get an (x,y) on the screen
  • SDL_GetRelativeMouseState() returns deltas of unclamped motion when the cursor is hidden, and deltas of clamped motion when it’s notOn Thu, Dec 11, 2008 at 3:41 PM, Donny Viszneki <donny.viszneki at gmail.com> wrote:

Does SDL also clamp absolute mouse positions under any circumstances?
I seem to recall that it might have under one platform, but it’s been
at least a year since the time I believe I observed this behavior.


Send e-mail faster without improving your typing skills.
http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008