[PR #2837] [MERGED] server packs: the download prompt acts as the screen it is #4647

Closed
opened 2026-11-03 05:06:54 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2837
Author: @iLostName
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @rdbtCVS

Base: main ← Head: pack-prompt-keeps-pointer


📝 Commits (5)

  • 560aa61 server packs: the download prompt keeps the pointer and stops the walking behind it
  • 8647467 server packs: the prompt takes the open screen's place, as PackConfirmScreen does
  • 5f5a43f focus loss doesn't open the pause menu over the pack prompt or a server dialog
  • e34f017 Merge main into pack-prompt-keeps-pointer
  • 7a62c6f Give the capture test's fixture the pack prompt

📊 Changes

3 files changed (+38 additions, -8 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+21 -7)
📝 crates/horizon-client/src/game/server_packs.rs (+2 -0)
📝 tests/test_world_input_capture.py (+15 -1)

📄 Description

What and why

The server resource pack prompt didn't act as the screen it is:

  • joining (or a proxy's Respawn) grabbed the mouse back while it was open, so its buttons couldn't be clicked, and keys held when it opened kept the player walking;
  • an open inventory or pause menu stayed drawn under it;
  • losing focus opened the pause menu under it.

It now keeps the pointer, releases the held keys, takes the open screen's place until it is answered, and focus loss leaves it alone, as for a server dialog.

Vanilla reference

ClientCommonPacketListenerImpl.handleResourcePackPush opens PackConfirmScreen with the current screen as its parent; Gui.setScreen with a screen calls KeyMapping.releaseAll, and only setScreen(null) grabs the mouse; Gui.setPauseScreen returns while a screen is open.

Self-check

pr_ready (tools/pr_ready.py --quick on PC-Lost, against origin/main at 12e0094f1, 6 min 16 s)

Check Result
Scope ✅ 2 files, +23 −7
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 331 run, FAILED (failures=2, errors=9, skipped=11) (48 s)
rustfmt ✅ (9 s)
clippy ❌ failed (1 min 23 s)
tests: horizon-client ❌ 1151 passed, 2 failed (2 min 30 s)
doc tests ✅ 0 passed (1 min 21 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Run on Windows: save::session_lock_is_exclusive, crash::stacks_start_at_the_panicking_frame and the Python tests fail there and are unrelated; clippy stops at the duplicate minecraft:rabbit arm in entity_nbt.rs:502, already on main (#2719 fixes it), and is clean with that lint allowed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2837 **Author:** [@iLostName](https://github.com/iLostName) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `pack-prompt-keeps-pointer` --- ### 📝 Commits (5) - [`560aa61`](https://github.com/horizon-rust/horizon/commit/560aa61e91ad10a3f96c4648d120b683772ad7d3) server packs: the download prompt keeps the pointer and stops the walking behind it - [`8647467`](https://github.com/horizon-rust/horizon/commit/86474679dbbcae9edae5a4d48d9c8f94cdc7cb15) server packs: the prompt takes the open screen's place, as PackConfirmScreen does - [`5f5a43f`](https://github.com/horizon-rust/horizon/commit/5f5a43fd54d993702dc2e5076cd855e0022c22b6) focus loss doesn't open the pause menu over the pack prompt or a server dialog - [`e34f017`](https://github.com/horizon-rust/horizon/commit/e34f01715ce6a085680453eefe71505f91b3460b) Merge main into pack-prompt-keeps-pointer - [`7a62c6f`](https://github.com/horizon-rust/horizon/commit/7a62c6f4a7edacaee9dac576bb766c8f7bc0feaa) Give the capture test's fixture the pack prompt ### 📊 Changes **3 files changed** (+38 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+21 -7) 📝 `crates/horizon-client/src/game/server_packs.rs` (+2 -0) 📝 `tests/test_world_input_capture.py` (+15 -1) </details> ### 📄 Description ## What and why The server resource pack prompt didn't act as the screen it is: - joining (or a proxy's Respawn) grabbed the mouse back while it was open, so its buttons couldn't be clicked, and keys held when it opened kept the player walking; - an open inventory or pause menu stayed drawn under it; - losing focus opened the pause menu under it. It now keeps the pointer, releases the held keys, takes the open screen's place until it is answered, and focus loss leaves it alone, as for a server dialog. ## Vanilla reference `ClientCommonPacketListenerImpl.handleResourcePackPush` opens `PackConfirmScreen` with the current screen as its parent; `Gui.setScreen` with a screen calls `KeyMapping.releaseAll`, and only `setScreen(null)` grabs the mouse; `Gui.setPauseScreen` returns while a screen is open. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on PC-Lost, against origin/main at 12e0094f1, 6 min 16 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +23 −7 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 331 run, FAILED (failures=2, errors=9, skipped=11) (48 s) | | rustfmt | ✅ (9 s) | | clippy | ❌ failed (1 min 23 s) | | tests: horizon-client | ❌ 1151 passed, 2 failed (2 min 30 s) | | doc tests | ✅ 0 passed (1 min 21 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Run on Windows: `save::session_lock_is_exclusive`, `crash::stacks_start_at_the_panicking_frame` and the Python tests fail there and are unrelated; clippy stops at the duplicate `minecraft:rabbit` arm in `entity_nbt.rs:502`, already on main (#2719 fixes it), and is clean with that lint allowed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:06:54 +07:00
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#4647
No description provided.