This issue has been present since 26.3 Snapshot 4.
Opening a screen that unhooks the cursor while the game window is maximized, unmaximizing the window and then pressing any mouse button while in a world causes the mouse cursor and input to exhibit some odd behavior.
The cursor will be visibly unhooked from the game and constantly in the center of the window. Mouse input will appear to do nothing. However, using the scroll wheel will make in-game camera turning specifically work again. Despite this, pressing any mouse button will cause the input to once again stop working. Opening a GUI screen to unhook the cursor or maximizing the window while having used the scroll wheel will fix the issue. (Maximizing the window without having used the scroll wheel will keep the bug until a mouse button is pressed, at which point it starts behaving normally).
This does not happen when the window is unmaximized at the start and then maximized.
Steps to reproduce:
Maximize the game window.
Open a menu so the cursor gets unhooked from the game
Close the menu you have opened so the game has control over the cursor once again.
Unmaximize the game window without unhooking the cursor, for example by pressing Windows key + Down Arrow on the keyboard.
Press any mouse button while in the world.
Observe the cursor’s behavior.
Expected result:
The mouse cursor and input would continue to work normally.
Actual result:
The mouse cursor and input behave oddly after repeating the above steps.
Thank you for helping us improve Minecraft! We saved your files: