steps to reproduce:
make game window unmaximized
load up world
when in world before pausing or opening any other screens, maximize game window
open inventory
or
load up world
turn pause on lost focus off
alt-tab to another window
move cursor position
alt-tab back in
open inventory
you will see that the cursor is somewhere up and to the left of the center of the screen.
code analysis (credit: jojoe77777):
this is caused by InputMappings$grabOrReleaseMouse
calling GLFW$glfwSetInputMode
before calling GLFW$glfwSetCursorPos
. If these calls are reversed and glfwSetCursorPos
is called first, the cursor is placed as expected in both cases to reproduce as outlined above.
This bug was introduced sometime between 1.13.2 and 1.14.0 per my testing, which makes a lot of sense.
Comments 3
Yes sorry, it's an extension of MC-150164 with additional situations. I thought I searched "cursor position" and didn't see any, interesting.
Do either MC-150164 or MC-261980 describe your issue?