[PR #6788] [CLOSED] Capture probe: one warp on the grab on Windows too #7096

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6788
Author: @Domanffe
Created: 11/2/2026
Status: ❌ Closed

Base: main ← Head: fix/capture-probe-warp-count


📝 Commits (1)

  • b550bce Capture probe: one warp on the grab on Windows too

📊 Changes

1 file changed (+5 additions, -3 deletions)

View changed files

📝 tests/test_world_input_capture.py (+5 -3)

📄 Description

🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself.

On Windows tests/test_world_input_capture.py is red on main right now:

thread 'main' panicked at capture.rs:375:5:
assertion `left == right` failed
  left: (1, (500.0, 300.0))
 right: (2, (500.0, 300.0))

Two changes crossed. f7301189a (for #6214) raised the fixture's grab to two
warps on Windows because #6126 had added a warp before the Locked grab while
the warp after it was still there. #6463 then removed the warp after the grab:
Windows pins the pointer inside a 1x1 ClipCursor at the point of the grab, so
the post-grab SetCursorPos cannot move it anywhere, and the pre-grab warp is
the one that reaches the window's centre (#6076). The code on main warps once
(crates/horizon-client/src/game.rs, capture: the post-grab warp is
cfg(not(any(target_os = "macos", target_os = "windows")))), and the fixture
still expected two.

This drops the Windows special case: every platform warps once on the grab and
twice more on the release, which is what main's capture does.

Verified on Windows: the probe panicked with the numbers above before the
change, and cd tests && python -m unittest test_world_input_capture now
reports Ran 2 tests ... OK. The fixture compiles the game's own capture and
capture_loaded_world, so it reads the shipped code, not a copy.

Nothing but the expectation and its comment changes.


🔄 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/6788 **Author:** [@Domanffe](https://github.com/Domanffe) **Created:** 11/2/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/capture-probe-warp-count` --- ### 📝 Commits (1) - [`b550bce`](https://github.com/horizon-rust/horizon/commit/b550bce09cc3d66baafbec4a75884e0a86cb3428) Capture probe: one warp on the grab on Windows too ### 📊 Changes **1 file changed** (+5 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_world_input_capture.py` (+5 -3) </details> ### 📄 Description > 🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself. On Windows `tests/test_world_input_capture.py` is red on `main` right now: ``` thread 'main' panicked at capture.rs:375:5: assertion `left == right` failed left: (1, (500.0, 300.0)) right: (2, (500.0, 300.0)) ``` Two changes crossed. `f7301189a` (for #6214) raised the fixture's grab to two warps on Windows because #6126 had added a warp before the Locked grab while the warp after it was still there. `#6463` then removed the warp after the grab: Windows pins the pointer inside a 1x1 `ClipCursor` at the point of the grab, so the post-grab `SetCursorPos` cannot move it anywhere, and the pre-grab warp is the one that reaches the window's centre (#6076). The code on `main` warps once (`crates/horizon-client/src/game.rs`, `capture`: the post-grab warp is `cfg(not(any(target_os = "macos", target_os = "windows")))`), and the fixture still expected two. This drops the Windows special case: every platform warps once on the grab and twice more on the release, which is what `main`'s `capture` does. Verified on Windows: the probe panicked with the numbers above before the change, and `cd tests && python -m unittest test_world_input_capture` now reports `Ran 2 tests ... OK`. The fixture compiles the game's own `capture` and `capture_loaded_world`, so it reads the shipped code, not a copy. Nothing but the expectation and its comment changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:33:43 +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#7096
No description provided.