mojira.dev
MC-267350

Minecraft fails to capture the mouse when closing the UI while the cursor is outside of the game window

The bug

If a UI screen such as the inventory or game menu is opened while the game is in windowed mode, the mouse cursor is moved outside of the game window, and then the inventory/menu/etc. is closed again through the keyboard, the mouse cursor is not immediately sucked back into the game window. This makes controlling the game difficult, since the cursor is not bound to the center of the window even when it reenters and can exit it by moving far enough like is the case with any other window.

Opening a menu screen and then exiting it while the cursor is within the window will get rid of this behaviour.

Linked issues

Attachments

Comments 2

Can't reproduce this on Windows, may be exclusive to Ubuntu.
May relate to MC-95014

This issue may be exclusive to GNOME.

muzikbike

(Unassigned)

Plausible

Platform

Normal

Input

1.20.4

Retrieved