[PR #6463] [MERGED] Windows: the grab warps the pointer once, and the capture probe passes #6892

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6463
Author: @Domanffe
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/capture-warp-once


📝 Commits (1)

  • b72f0b5 Windows: the grab warps the pointer once, and the capture probe passes

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+2 -1)

📄 Description

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

Game::capture now warps the pointer to the window's centre before the grab on
Windows (#6126), which is what makes a Windows Locked grab land on the centre
instead of freezing the pointer where it was. The warp that ran after the grab is
still there for Windows, so a grab moves the pointer twice, and
tests/test_world_input_capture.py fails on a Windows checkout:

ERROR: test_capture_lifecycle
subprocess.CalledProcessError: Command '...capture.exe' returned non-zero exit status 101

The probe compiles capture into a small program with a fake window and asserts
one warp per grab. With the second warp it counts two and the assert panics. On
Linux the Windows arm is not compiled, which is why the red only shows here.

This drops the post-grab warp on Windows, leaving the platforms that still need
it: macOS warps first for its own reason, everywhere else keeps the warp after
the grab. Behaviour is unchanged: the pre-grab warp already puts the pointer at
the same point the second one aimed at.

Verified: python -m unittest test_world_input_capture under tests/ fails on
origin/main (capture.exe exits 101 on the two-warp count) and passes with the
change; cargo fmt --all --check and cargo check -p horizon-client --all-targets pass, so the Windows arm is compiled.

The pr_ready block follows as a comment.


🔄 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/6463 **Author:** [@Domanffe](https://github.com/Domanffe) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/capture-warp-once` --- ### 📝 Commits (1) - [`b72f0b5`](https://github.com/horizon-rust/horizon/commit/b72f0b52f89ffa5bd32f7a8d29e0dbf7c0742569) Windows: the grab warps the pointer once, and the capture probe passes ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+2 -1) </details> ### 📄 Description > 🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself. `Game::capture` now warps the pointer to the window's centre before the grab on Windows (#6126), which is what makes a Windows `Locked` grab land on the centre instead of freezing the pointer where it was. The warp that ran after the grab is still there for Windows, so a grab moves the pointer twice, and `tests/test_world_input_capture.py` fails on a Windows checkout: ``` ERROR: test_capture_lifecycle subprocess.CalledProcessError: Command '...capture.exe' returned non-zero exit status 101 ``` The probe compiles `capture` into a small program with a fake window and asserts one warp per grab. With the second warp it counts two and the assert panics. On Linux the Windows arm is not compiled, which is why the red only shows here. This drops the post-grab warp on Windows, leaving the platforms that still need it: macOS warps first for its own reason, everywhere else keeps the warp after the grab. Behaviour is unchanged: the pre-grab warp already puts the pointer at the same point the second one aimed at. Verified: `python -m unittest test_world_input_capture` under `tests/` fails on `origin/main` (`capture.exe` exits 101 on the two-warp count) and passes with the change; `cargo fmt --all --check` and `cargo check -p horizon-client --all-targets` pass, so the Windows arm is compiled. The `pr_ready` block follows as a comment. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:28: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#6892
No description provided.