1.3 and mouse events issues, + getting raw state

Hi. I’ve been trying to get mouse grab working with the latest 1.3 svn,
without success. Neither SDL_SetWindowGrab, SDL_SetRelativeMouseMode
or SDL_WM_GrabInput (compat) seems to have any effect at all. Even
hiding the mouse doesn’t work. Also, the windowID field of the mouse
event structs are always 0. This is on 64-bit Linux. Is this working for
anyone else?

Also, a request: Could we get a SDL_GetRawMouseState function or
similar? This could be used to get the mouse position in screen
coordinates (currently not directly possible since window border size
is unknown), and also to get full resolution out of tablets and such if
possible (ie more than desktop res). I’d find that very useful =)

  • Gerry

2008/11/9 Gerry JJ

Hi. I’ve been trying to get mouse grab working with the latest 1.3 svn,
without success. Neither SDL_SetWindowGrab, SDL_SetRelativeMouseMode
or SDL_WM_GrabInput (compat) seems to have any effect at all. Even
hiding the mouse doesn’t work. Also, the windowID field of the mouse
event structs are always 0. This is on 64-bit Linux. Is this working for
anyone else?

Also, a request: Could we get a SDL_GetRawMouseState function or
similar? This could be used to get the mouse position in screen
coordinates (currently not directly possible since window border size
is unknown), and also to get full resolution out of tablets and such if
possible (ie more than desktop res). I’d find that very useful =)

  • Gerry

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

Hi,

I’ll look into the Grab functions.

What operating system are you using? The SDL_SetRelativeMouseMode worked
fine for me on windows and on X11. Hiding the mouse may not work, cause the
cursor parts of SDL 1.3 aren’t implemented yet.

The SDL_GetRawMouseState() function. I didn’t consider it before, but I
think I could implement it. I’ll have to check about getting the resolution
of tablets.

Best wishes–
–SW

Hey, I’d like to add to this, it seems that in 1.3, the windowID field in
mouse motion events doesn’t get filled with an actual ID, can you confirm ?

Den Sun, 9 Nov 2008 21:14:50 +0100
skrev “Szymon Wilczek” :

I’ll look into the Grab functions.

Thank you =)

What operating system are you using? The SDL_SetRelativeMouseMode
worked fine for me on windows and on X11. Hiding the mouse may not
work, cause the cursor parts of SDL 1.3 aren’t implemented yet.

I’m using the 64-bit version of Arch Linux. kernel 2.6.27.4,
xorg-server 1.4.2.

The SDL_GetRawMouseState() function. I didn’t consider it before, but
I think I could implement it. I’ll have to check about getting the
resolution of tablets.

That’d be great. Having the information in the event structs would
also be nice btw, if possible =). I see the motion event struct’s
getting a bit crowded though, don’t know if that’s a concern… Though
pressure_max and pressure_min doesn’t vary for a device(?), so that
could perhaps be moved to a query function in stead.

While I’m at it, “tilt” in the motion struct should probably be split
into something like “tilt_x” and “tilt_y” since tilt is two-dimensional.

Also, just found a new problem: When using any tool with my tablet
(stylus, eraser, mouse), only one mouse motion event is generated, at
proximity in. After that, nothing. I’m pretty sure this used to work
with an earlier svn revision (I could try a couple if it helps).

Oh, and devices seem to be enumerated in reverse (reported this on the
bugzilla a while ago, but I don’t know if you follow that). My primary
mouse is device #3 here.

  • Gerry

I observed this too.

Josh

Jasper van Eck wrote:> Hey, I’d like to add to this, it seems that in 1.3, the windowID field

in mouse motion events doesn’t get filled with an actual ID, can you
confirm ?


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

2008/11/10 Gerry JJ

Den Sun, 9 Nov 2008 21:14:50 +0100
skrev “Szymon Wilczek” <@Szymon_Wilczek>:

I’ll look into the Grab functions.

Thank you =)

What operating system are you using? The SDL_SetRelativeMouseMode
worked fine for me on windows and on X11. Hiding the mouse may not
work, cause the cursor parts of SDL 1.3 aren’t implemented yet.

I’m using the 64-bit version of Arch Linux. kernel 2.6.27.4,
xorg-server 1.4.2.

The SDL_GetRawMouseState() function. I didn’t consider it before, but
I think I could implement it. I’ll have to check about getting the
resolution of tablets.

That’d be great. Having the information in the event structs would
also be nice btw, if possible =). I see the motion event struct’s
getting a bit crowded though, don’t know if that’s a concern… Though
pressure_max and pressure_min doesn’t vary for a device(?), so that
could perhaps be moved to a query function in stead.

The growth od the mouse_motion structure is a problem. I’ll see what we can
do about this matter.

While I’m at it, “tilt” in the motion struct should probably be split
into something like “tilt_x” and “tilt_y” since tilt is two-dimensional.

Well, I’m borrowing a tablet with such capabilities from my friend so
actually I have no idea. I’m experimenting with it.

Also, just found a new problem: When using any tool with my tablet
(stylus, eraser, mouse), only one mouse motion event is generated, at
proximity in. After that, nothing. I’m pretty sure this used to work
with an earlier svn revision (I could try a couple if it helps).

I haven’t made changes in the svn for quite a long time now, so I don’t know
if something was changed. What do you mean there is only one event
generated? That it is not generated anymore even if you move the tool out of
the tablet range?

Oh, and devices seem to be enumerated in reverse (reported this on the
bugzilla a while ago, but I don’t know if you follow that). My primary
mouse is device #3 here.

About the devices… It’s normal. It is reported how the XServer notices
them. We are querying all devices as XServer ‘wants’ us to. I’ll check it,
but I think that’s a normal matter. Is that a problem?

  • Gerry

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

I’m having some problems here now. So I’m afraid you’ll have to wait about a
week for effects on the matters we disscussed here. I hope that’s not too
long for you.

Best wishes–
–SW