Essentially my problem is the same with this one the only thing is that I don’t use a virtual machine or something.

I have arch linux installed with gnome and X if it matters.
Any ideas why this can happen?


Are you getting large values as per your title (which could be normal behaviour), or large delta values ( dX = X(t)-X(t-1) ) different from those you get with the cursor enabled and the same mouse movement?


Before the answer one question first.

Is GLFWcursorposfun callback supposed to return window coordinates and not deltas even after setting input mode to CURSOR_DISABLED?

As for my case I get large values and therefore and large deltas (which I manually calculate) after setting that mode.

For example the following data:

146 513
-668 518
-1481 523
-2293 528
-3105 532
-3916 536
-4727 540
-5537 544
-6347 548
-7156 552

are with in ~1.5 second of movement to the right of width which is equal in practice at max 100 pixels to the right


With the cursor disabled the values are still in screen coordinates relative to the upper-left corner of the client area of the specified window, but unbounded so can be large.

However you should get the same delta for a given mouse movement as you get with the cursor enabled.

I would do a test with the latest code from Github if possible, and if the problem remains create a new issue on Github with as much information as possible. If you need help with creating the issue let me know.


Duh found the reason…

For all the others Arch linux users that may end up here:

Through pacman I had installed the glfw-x11 version long ago. After some time and many updates it turns out that I now run on wayland.
So uninstalling it and installing glfw-wayland version fixed things.

Finally @dougbinks thanks for your replies.


Glad you found the solution!