mojira.dev
MC-65983

Mouse cursor moves off-window when accessing inventory (or item contents)

The bug occurs when accessing a contents box (like your inventory, chest contents, etc.) when running Minecraft in an windowed environment. When the window has focus, you can right-click to interact or use an item. However, if you access any contents box, the mouse cursor appears below the window (several inches below - out of the scope of the window). If you close the contents box with the keyboard (for example, 'E' to close your inventory), the mouse cursor disappears but any right-clicks are sent to the location where the mouse cursor exists (still below the window).

To mitigate this issue, you have to reopen a contents box (or your inventory), move the cursor from below the window to within the window, and then close the inventory. This has to be repeated every time you access a contents box.

I believe the fix is to center the cursor on the window and not place it below.

Linked issues

Comments 22

It always centers in the window for me (right over the crosshair)

Have you tried it on a separate monitor? It works fine when disconnected from non-Retina external displays.

Ah, missed that part.

I think I've figured this out (or at least what the trigger is). Minecraft, regardless of what screen the Launcher appears on, will always start on the built-in Retina display (I would assume the primary display). The cursor stays to the center of the windows (as expected). However, when moving a window to a workspace on an external monitor that is non-HiDPI (I have two Thunderbolt displays), the cursor is centered horizontally but not vertically. Returning the Minecraft window back to the built-in Retina display restore expected cursor behavior.

Definitely a bug. Similar to other Retina related bugs, but different in that it affects the cursor.

Did some changes, might have fixed it.

12 more comments

I can confirm this is still an issue with the latest 1.9 release. I have the exact same setup as Riekman. My external monitor is setup as my primary screen. My built in MacBook Pro Retina laptop screen is my secondary screen. When playing Minecraft on the laptop screen (not the primary, external monitor), accessing chests, inventory, furnaces, etc, will cause mouse issues.

Here are the simple steps to repeat:
1) Play Minecraft on the secondary screen, in windowed mode.
2) Open inventory 'E' (important - don't move the mouse at all).
3) Use 'E' again to close inventory. At this point, mouse movement, clicking, etc will cease to function.

To get it working again one must:
a) open inventory 'E',
b) move mouse back into window area,
c) close inventory.

Hope this helps.

Hi. I just tested both 1.10.2 and 16w42a.

Unfortunately the issue is still present.

Can someone please check if this is still an issue in the latest 17w49b snapshot.

I tested it on both the latest release 1.12.2 and the latest snapshot 17w49b.

The latest release 1.12.2 still has the issue (Which is why mods didn't ask about testing the release, probably 😛)

But... HALLELUJAH! The issue is fixed on my mac when I run the latest 17w49b snapshot!

Thanks to whoever was working on this!

Michael Yohe

Erik Broes

Community Consensus

mouse, retina

Minecraft 1.7.10, Minecraft 14w34b, Minecraft 14w34d, Minecraft 1.8-pre3, Minecraft 1.8, ..., Minecraft 1.9, Minecraft 1.10.2, Minecraft 16w42a, Minecraft 1.12.1, Minecraft 1.12.2

Minecraft 17w49b

Retrieved