# Why set mouse pos when Enable/Disable cursor?

**URL:** <https://discourse.glfw.org/t/why-set-mouse-pos-when-enable-disable-cursor/438>\
**Category:** support\
**Created:** [September 16, 2007, 5:15am UTC](https://discourse.glfw.org/t/why-set-mouse-pos-when-enable-disable-cursor/438 "2007-09-16T05:15:07Z")\
**Posts on this page:** 2\
**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:** [September 16, 2007, 5:15am UTC](https://discourse.glfw.org/t/why-set-mouse-pos-when-enable-disable-cursor/438/1 "2007-09-16T05:15:07Z")

</div>

**nobody** wrote on [Sunday, September 16, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/068a6d2b/#e596):

I’m just wondering, since this is making it impossible to do my app. design which:

runs windowed, but shows its own cursor when the mouse is over it (disable the systems) and then restores the systems when the mouse leaves the window area.

well, since GLFW force sets the mouse position when Enable/Disable GLFW\_MOUSE\_CURSOR, its making it almost impossible to do. Is there some reason I can’t remove that force code from the lib?

Jason (jason /at/ wishray |dot| com)

---

<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:** [September 18, 2007, 1:43am UTC](https://discourse.glfw.org/t/why-set-mouse-pos-when-enable-disable-cursor/438/2 "2007-09-18T01:43:40Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Tuesday, September 18, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/068a6d2b/#e596/ce93):

The problem is that the current GLFW API doesn’t differentiate between hiding the mouse cursor and locking it. I’m sorry that the changes broke your code, and there’s no reason why you can’t edit out that bit of the code and recompile.

The next revision of the API will separate these two concepts, and thus enable client code like yours to work as expected.
