Can't look with mouse when holding any mouse button in certain systems
It seems like the game doesn't restore its window focus correctly since a 1.19 snapshot.
When the game window loses focus and it's restored back, it becomes impossible to look around while holding any mouse button (left, middle or right). It can only be fixed by pausing and unpausing by pressing Escape.
I play on Linux and I'm not sure if it affects other platforms as well.
This issue was introduced in the 1.19 snapshot 22w16a. It doesn't exist in 22w15a and prior versions of Minecraft. Maybe it's due to the LWJGL update to 3.3.1, but it's just my wild guess.
Steps to Reproduce:
- Enter a single-player world or join a server.
- Lose window focus by Alt-Tabbing or through some other method.
- Focus back on the game window.
- Now it depends if the game paused after losing focus or not. It doesn't do it consistently for me. But when it doesn't pause (for me it's the case most of the time):
- Hold any mouse button and try to look. You can't.
Environment
Distribution: Arch Linux
Window manager: i3-gaps
Java version: OpenJDK 18.0.1.1
Created Issue:
Can't look with mouse when holding any mouse button
It seems like the game doesn't restore its window focus correctly since a 1.19 snapshot.
When the game window loses focus and it's restored back, it becomes impossible to look around while holding any mouse button (left, middle or right). It can only be fixed by pausing and unpausing by pressing Escape.
I play on Linux and I'm not sure if it affects other platforms as well.
This issue was introduced in the 1.19 snapshot 22w16a. It doesn't exist in 22w15a and prior versions of Minecraft. Maybe it's due to the LWJGL update to 3.3.1, but it's just my wild guess.
Steps to Reproduce:
- Enter a single-player world or join a server.
- Lose window focus by Alt-Tabbing or through some other method.
- Focus back on the game window.
- Now it depends if the game paused after losing focus or not. It doesn't do it consistently for me. But when it doesn't pause (for me it's the case most of the time):
- Hold any mouse button and try to look. You can't.
Environment
Distribution: Arch Linux
Window manager: i3-gaps
Java version: OpenJDK 18.0.1.1
Can't look with mouse when holding any mouse button in certain systems
I noticed that pressing Escape is not the only thing that fixes it, entering any menu like inventory, crafting table, chest, etc. also has the same effect.
I got a second monitor recently and I noticed that during this state when you move your mouse while holding it, you can move the cursor to another monitor, but it's still invisible. But once you let it go it becomes visible again. So it seems that it doesn't capture the mouse correctly somehow, you can move the cursor outside of game window, even though it's hidden.
As of today (January 12, 2024), this problem still exists on Linux, exactly as described by the original report.
I use Archlinux, with i3-wm as my window-manager/desktop, using X11 and an Nvidia card. Openjdk version "21" 2023-09-19.
The bug triggers whenever I leave window focus and come back to it. Then I can temporarily resolve it by opening any minecraft menu (either escape or opening my inventory).
Another way to resolve the issue is to turn Raw Input (Mouse Settings) OFF. So this might narrow the issue down to using Raw Input on Linux, with a very minimalist desktop (like a tiling window-manager).