# Problem with mouse hiding

**URL:** <https://discourse.glfw.org/t/problem-with-mouse-hiding/424>\
**Category:** support\
**Created:** [April 30, 2007, 1:08pm UTC](https://discourse.glfw.org/t/problem-with-mouse-hiding/424 "2007-04-30T13:08:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [April 30, 2007, 1:08pm UTC](https://discourse.glfw.org/t/problem-with-mouse-hiding/424/1 "2007-04-30T13:08:19Z")

</div>

**nobody** wrote on [Monday, April 30, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/88f0a487/#a991):

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [April 30, 2007, 7:16pm UTC](https://discourse.glfw.org/t/problem-with-mouse-hiding/424/2 "2007-04-30T19:16:33Z")

</div>

**[melekor](https://sourceforge.net/u/melekor/)** wrote on [Monday, April 30, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/88f0a487/#f489):

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](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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 1, 2007, 5:11pm UTC](https://discourse.glfw.org/t/problem-with-mouse-hiding/424/3 "2007-05-01T17:11:12Z")

</div>

**nobody** wrote on [Tuesday, May 01, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/88f0a487/#6379):

The best solution would be to switch to SDL ([http://www.libsdl.org/](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)

> **[Simple DirectMedia Layer](https://en.wikipedia.org/wiki/Simple_DirectMedia_Layer)**
>
> Simple DirectMedia Layer (SDL) is a cross-platform software development library designed to provide a hardware abstraction layer for computer multimedia hardware components. Software developers can use it to write high-performance computer games and other multimedia applications that can run on many operating systems such as Android, iOS, Linux, macOS, and Windows.
> SDL manages video, audio, input devices, CD-ROM, threads, shared object loading, networking and timers. For 3D graphics, it can ha...

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 1, 2007, 7:25pm UTC](https://discourse.glfw.org/t/problem-with-mouse-hiding/424/4 "2007-05-01T19:25:44Z")

</div>

**[lonesock](https://sourceforge.net/u/lonesock/)** wrote on [Tuesday, May 01, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/88f0a487/#4e45):

@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^)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 2, 2007, 12:37am UTC](https://discourse.glfw.org/t/problem-with-mouse-hiding/424/5 "2007-05-02T00:37:59Z")

</div>

**nobody** wrote on [Wednesday, May 02, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/88f0a487/#98d2):

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 2, 2007, 1:10am UTC](https://discourse.glfw.org/t/problem-with-mouse-hiding/424/6 "2007-05-02T01:10:59Z")

</div>

**[melekor](https://sourceforge.net/u/melekor/)** wrote on [Wednesday, May 02, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/88f0a487/#6379/4989):

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 2, 2007, 2:40pm UTC](https://discourse.glfw.org/t/problem-with-mouse-hiding/424/7 "2007-05-02T14:40:55Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Wednesday, May 02, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/88f0a487/#98d2/766a):

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 2, 2007, 7:28pm UTC](https://discourse.glfw.org/t/problem-with-mouse-hiding/424/8 "2007-05-02T19:28:50Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Wednesday, May 02, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/88f0a487/#f489/f974):

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 8, 2007, 12:15pm UTC](https://discourse.glfw.org/t/problem-with-mouse-hiding/424/9 "2007-05-08T12:15:15Z")

</div>

**nobody** wrote on [Tuesday, May 08, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/88f0a487/#a991/7692):

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
