Relative mouse movement

OK, can somebody help me figure out how these are supposed to work? I
imagine that only motion within the window is reported?

Also the wiki makes a confusing statement:
“Only relative motion events will be delivered, the mouse position
will not change.”

I assume that only applies to what SDL reports? Because the cursor
seemed to be able to move away from the window without much trouble to
me.

According to comments in the headers, it should grab mouse input and
warp the mouse back to the centre of the window if it gets close to a
border. But from my experience there seems to be a few seconds of
delay before the described behaviour kicks in.

2013/7/10 Sik the hedgehog <sik.the.hedgehog at gmail.com>:> OK, can somebody help me figure out how these are supposed to work? I

imagine that only motion within the window is reported?

Also the wiki makes a confusing statement:
“Only relative motion events will be delivered, the mouse position
will not change.”

I assume that only applies to what SDL reports? Because the cursor
seemed to be able to move away from the window without much trouble to
me.


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

Oh gosh it just got weirder. Why is windowID in the mouse motion event
an integer? I’m using it to tell if the cursor is inside the window or
not (I need this because my game renders the cursor on its own and I
don’t want it to render the cursor when it’s not on the window). What
value does it have when the cursor is not in a window?

Nevermind it’s 0.

2013/7/10, Sik the hedgehog <@Sik_the_hedgehog>:> Oh gosh it just got weirder. Why is windowID in the mouse motion event

an integer? I’m using it to tell if the cursor is inside the window or
not (I need this because my game renders the cursor on its own and I
don’t want it to render the cursor when it’s not on the window). What
value does it have when the cursor is not in a window?

Yet another question: is relative mouse mode supposed to make the
cursor stop moving whenever a mouse button is pressed? :confused: Moreover, is
it me or the cursor moves much slower when relative mouse mode is on?
(I guess it isn’t measured in pixels anymore?)