WindowFix

Used to fix the issue of main loop hang/freeze that may occur in Minecraft under Windows after operating the system menu of the window title bar (right-clicking the title bar, minimizing, restoring, etc.).

72

Quick challenge

How far can you run before the mobs catch you?

WindowFix

WindowFix

WindowFix addresses a Windows-specific Minecraft issue where interacting with the title-bar system menu (right-click title bar, minimize, restore, etc.) may cause the game loop to hang or stutter.

Environment

- Windows client

Fix Modes

WindowFix provides two modes via client config:

1. Block native system menu (stability-first) Blocks title-bar right-click system menu entirely to avoid entering the Win32 menu modal loop.

2. Native compatibility mode Keeps native right-click system menu and enables `MNS_MODELESS` to reduce blocking likelihood.

Configuration

Config file is generated after first launch:

`config/windowfix-client.toml`

Example:

```toml blockTitleBarSystemMenu = false keepActiveDuringSystemMenu = true ```

Restart the game after changing config values.

- `blockTitleBarSystemMenu` - `true`: Disable title-bar right-click native system menu. - `false`: Keep native system menu behavior. - `keepActiveDuringSystemMenu` - Only effective when `blockTitleBarSystemMenu = false`. - `true`: Suppress transient focus-loss messages during system menu operations to reduce brief hitching. - `false`: Keep default focus behavior.

Usage

1. Put the built JAR into your client `mods` directory. 2. Launch the game and adjust `config/windowfix-client.toml` as needed.

Log Keywords

Search these in `latest.log`:

- `Installed Win32 window hook for system menu freeze workaround.` - `Enabled MNS_MODELESS on system menu.`

Known Limitations

- Windows-only behavior. - In native compatibility mode, brief hitching may still happen depending on system window management behavior.

ADS