[PR #5796] [MERGED] fix(mods): cancelled screen clicks preserve navigation focus #6503

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5796
Author: @Xmilon
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @levzzz5154

Base: main ← Head: native/5672-cancelled-click-focus


📝 Commits (1)

  • 47a342e fix(mods): keep cancelled screen clicks from moving navigation focus

📊 Changes

3 files changed (+103 additions, -17 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+1 -0)
📝 crates/horizon-client/src/game/pad_menu.rs (+27 -17)
➕ tests/test_screen_mouse_focus.py (+75 -0)

📄 Description

🤖 Opened by Xmilon's AI agent (Codex), not by Xmilon personally.

What and why

Fixes #5672. A screen mouse press cancelled by a native mod no longer moves keyboard navigation to the widget under the pointer. Switching the input type back to mouse still happens before the hook. Accepted left presses still select the navigation origin; synthetic clicks are excluded.

Kind

  • bug: a crash or a breakage

Vanilla reference

MouseHandler.onButton sets the input type before the screen sees a press. ContainerEventHandler.mouseClicked moves focus only when the screen handles it, as described in #5672. No gameplay rule changes. Pinned-bytecode and real-game validation were not run locally.

Other projects' code

None.

Self-check

Two focused Python regression tests passed, including compiling the actual Rust focus method with a lightweight input fixture. Checks accepted, right, released, synthetic and non-menu clicks, boundary hit testing, and cancel-before-focus wiring. Client lib/bin/test Clippy and formatting passed locally; upstream verify and launcher checks passed. Combined integration Clippy, formatting, public-tree and focused checks also passed. No in-game or visual claim.

🤖 Generated with Codex


🔄 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/5796 **Author:** [@Xmilon](https://github.com/Xmilon) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `native/5672-cancelled-click-focus` --- ### 📝 Commits (1) - [`47a342e`](https://github.com/horizon-rust/horizon/commit/47a342e6c91295f597fab9d22a6f1cf5ce04fbd6) fix(mods): keep cancelled screen clicks from moving navigation focus ### 📊 Changes **3 files changed** (+103 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+1 -0) 📝 `crates/horizon-client/src/game/pad_menu.rs` (+27 -17) ➕ `tests/test_screen_mouse_focus.py` (+75 -0) </details> ### 📄 Description > 🤖 Opened by Xmilon's AI agent (Codex), not by Xmilon personally. ## What and why Fixes #5672. A screen mouse press cancelled by a native mod no longer moves keyboard navigation to the widget under the pointer. Switching the input type back to mouse still happens before the hook. Accepted left presses still select the navigation origin; synthetic clicks are excluded. ## Kind - [x] bug: a crash or a breakage ## Vanilla reference MouseHandler.onButton sets the input type before the screen sees a press. ContainerEventHandler.mouseClicked moves focus only when the screen handles it, as described in #5672. No gameplay rule changes. Pinned-bytecode and real-game validation were not run locally. ## Other projects' code None. ## Self-check Two focused Python regression tests passed, including compiling the actual Rust focus method with a lightweight input fixture. Checks accepted, right, released, synthetic and non-menu clicks, boundary hit testing, and cancel-before-focus wiring. Client lib/bin/test Clippy and formatting passed locally; upstream verify and launcher checks passed. Combined integration Clippy, formatting, public-tree and focused checks also passed. No in-game or visual claim. 🤖 Generated with [Codex](https://openai.com/codex/) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:21:44 +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#6503
No description provided.