# Mouse movement is limited in fullscreen

**URL:** <https://discourse.glfw.org/t/mouse-movement-is-limited-in-fullscreen/1311>\
**Category:** support\
**Created:** [April 1, 2019, 11:47am UTC](https://discourse.glfw.org/t/mouse-movement-is-limited-in-fullscreen/1311 "2019-04-01T11:47:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![OmegaDoom](https://avatars.discourse-cdn.com/v4/letter/o/ed8c4c/32.png) [@OmegaDoom](https://discourse.glfw.org/u/OmegaDoom)\
**Post date:** [April 1, 2019, 11:47am UTC](https://discourse.glfw.org/t/mouse-movement-is-limited-in-fullscreen/1311/1 "2019-04-01T11:47:12Z")

</div>

Hello.

I’m using glfw in mingw. When i switch to fullscreen i can move my camera only about 90 degrees in any direction(left, right, up or down). When i’m trying to go over 90 degrees then mouse callback sends only zero values.

glfwSetInputMode(m\_window, GLFW\_CURSOR, GLFW\_CURSOR\_DISABLED) doesn’t change this behavior. But with cursor enabled i can see that mouse movements are bound to cursor movements inside window.

AFAIK this behavior is same when mouse input is captured by specific window with a function like SetCapture. Is it possible to have different behavior where we can rotate a camera 360 degrees?

Thanks.

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [April 1, 2019, 12:04pm UTC](https://discourse.glfw.org/t/mouse-movement-is-limited-in-fullscreen/1311/2 "2019-04-01T12:04:33Z")

</div>

Using GLFW\_CURSOR\_DISABLED works for me on the platforms I’ve used, so perhaps this is a MinGW related issue. Could you add some more information about which version of GLFW you are using and whether you compiled it yourself, if so how etc.?

---

<div class="post-metadata">

**Author:** ![OmegaDoom](https://avatars.discourse-cdn.com/v4/letter/o/ed8c4c/32.png) [@OmegaDoom](https://discourse.glfw.org/u/OmegaDoom)\
**Post date:** [April 1, 2019, 12:12pm UTC](https://discourse.glfw.org/t/mouse-movement-is-limited-in-fullscreen/1311/3 "2019-04-01T12:12:04Z")

</div>

Hmm. I found the root cause.

glfwSetInputMode(m\_window, GLFW\_CURSOR, GLFW\_CURSOR\_DISABLED); works.  
It doesn’t work if after it we call glfwSetInputMode(m\_window, GLFW\_CURSOR, GLFW\_CURSOR\_HIDDEN); I suppose I should call glfwSetInputMode(m\_window, GLFW\_CURSOR, GLFW\_CURSOR\_DISABLED | GLFW\_CURSOR\_HIDDEN); if i want to have two flags enabled.

Thanks!

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [April 1, 2019, 1:39pm UTC](https://discourse.glfw.org/t/mouse-movement-is-limited-in-fullscreen/1311/4 "2019-04-01T13:39:43Z")

</div>

Excellent, glad you have a solution.

Note that the values are not flags, and cannot be or’d together. GLFW\_CURSOR\_DISABLED will hide the cursor so you don’t need GLFW\_CURSOR\_HIDDEN. You only need the later if you want to hide the cursor but keep the standard behaviour, for example to implement your own cursor rendering.
