[GH-ISSUE #612] Mouse capture is not restored automatically after loading a world #189

Closed
opened 2026-11-02 15:37:07 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @LookImEcho-Rick on GitHub (Oct 17, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/612

Problem

On Windows, entering a world from Horizon's title screen can leave the application active but the mouse uncaptured. The world appears ready, yet mouse look requires an additional click inside the window. The original report also mentioned keyboard input; that symptom has not been independently isolated.

Reproduction

  1. Launch Horizon and select an existing world, or create a new world.
  2. Keep Horizon active while it loads.
  3. Once the world appears, move the mouse without clicking the window.

Expected: mouse look and gameplay input initialize automatically while the window is active, matching Minecraft Java Edition 26.3.
Observed: the cursor can remain uncaptured until the player clicks.

Investigation

The local player spawn path and the integrated/remote level-ready path do not request mouse capture when loading completes. The gameplay click handler performs the missing grab.

In the pinned vanilla 26.3 client, LevelLoadingScreen.tick/onClose reaches Screen.onClose, Gui.setScreen(null), and MouseHandler.grabMouse(). The grab checks Minecraft.isWindowActive() before capturing. Inspected through mcsrc.dev, local pinned sources, and tools/rea_vanilla.py.

A minimal fix has been tested locally. The reporter says loading now seems to work. Further menu, Alt+Tab, and controller coverage remains separate from that confirmation.

Originally created by @LookImEcho-Rick on GitHub (Oct 17, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/612 ## Problem On Windows, entering a world from Horizon's title screen can leave the application active but the mouse uncaptured. The world appears ready, yet mouse look requires an additional click inside the window. The original report also mentioned keyboard input; that symptom has not been independently isolated. ## Reproduction 1. Launch Horizon and select an existing world, or create a new world. 2. Keep Horizon active while it loads. 3. Once the world appears, move the mouse without clicking the window. Expected: mouse look and gameplay input initialize automatically while the window is active, matching Minecraft Java Edition 26.3. Observed: the cursor can remain uncaptured until the player clicks. ## Investigation The local player spawn path and the integrated/remote level-ready path do not request mouse capture when loading completes. The gameplay click handler performs the missing grab. In the pinned vanilla 26.3 client, `LevelLoadingScreen.tick/onClose` reaches `Screen.onClose`, `Gui.setScreen(null)`, and `MouseHandler.grabMouse()`. The grab checks `Minecraft.isWindowActive()` before capturing. Inspected through [mcsrc.dev](https://mcsrc.dev/2/26.3/net/minecraft/client/MouseHandler), local pinned sources, and `tools/rea_vanilla.py`. A minimal fix has been tested locally. The reporter says loading now seems to work. Further menu, Alt+Tab, and controller coverage remains separate from that confirmation.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#189
No description provided.