Problem with mouse hiding

nobody wrote on Monday, April 30, 2007:

Hi

I have a problem with hiding the mouse in my app. Im hideing the mouse using (windowed mode)
glfwDisable (GLFW_MOUSE_CURSOR); but i cant see the mouse cursor when the mouse leaves the window so i use
glfwEnable (GLFW_MOUSE_CURSOR); to enable it but the position of the mouse sets itself to the middle of the screen.
What im trying to do is to have mouse hidden when the mouse is over the window and visible when its out of windows area. Im working on Windows XP if thats relevant.

melekor wrote on Monday, April 30, 2007:

There is no way to do what you want to do using the current glfw API. I proposed an extension that would allow you to do exactly what you are looking for, among other things. (See here: https://sourceforge.net/tracker/index.php?func=detail&aid=1540353&group_id=72569&atid=534941) Unfortunately there appears to be little interest in this feature from the current developers, so I wouldn’t hold your breath. If you absolutely need the feature on XP (as I did), you could take a look at the source code I posted in the above URL, and compile your own version of glfw with it. Call glfwCreateCursor to make a 1x1 transparent cursor, then glfwSetCursor to set the cursor. Now the cursor will be invisible when over the window, and normal otherwise.

nobody wrote on Tuesday, May 01, 2007:

The best solution would be to switch to SDL (http://www.libsdl.org/) Its like GLFW, but with much better developer support and cross platform compatibility. Its also been used successfully in commercial products. (Mac OSX Quake 4 for example)

lonesock wrote on Tuesday, May 01, 2007:

@melekor: I like your solution.

( let me recap the above thread:
Anonymous #1: I need help adjusting the mirror on my BMW.
melekor: here, some instructions.
Anonymous #2: Buy a Lexus, Michael Jordon once drove one.
[8^)

nobody wrote on Wednesday, May 02, 2007:

Only, you don’t have to pay anything. Its all free software. Switching only involves a bit of work.

Its likely that in the end you’ll be better off; the GLFW devs seem to be pretty laid back and uninvolved in fixing problems as they come up; whereas SDL has dealt with most of these problems already and has a more active community.

melekor wrote on Wednesday, May 02, 2007:

Not really appropriate. This is "Using GLFW", not "Plug your favorite library".

SDL isn’t perfect either. My app supports both (choose at compile time) and I can tell you SDL has its own problems. I ended up having to modify the source code of both GLFW and SDL to achieve what I needed.

elmindreda wrote on Wednesday, May 02, 2007:

I’m afraid that at the moment, the GLFW devs are me, and I’ve been buried in work. I’m truly sorry about that, and if I could clone myself, I would.

That being said, patches are always most welcome and CVS commit bits can be had for a few well-formatted, readable patches and some participation on glfw-dev and/or #glfw.

elmindreda wrote on Wednesday, May 02, 2007:

How do you conclude that there’s little interest from the fact that 2.6 is in feature freeze?

nobody wrote on Tuesday, May 08, 2007:

Well i started this topic
and wat i realny need is to have the mouse work this way on mac osX,
Im useing glfw to port framework that im curently develpoing to mac osX and i only need glfw to work (properly)under mac
im only using glfw under xp for testing purposes. So my question is:

Will the Mouse behave properly under mac osx ?

thx