fix(sandbox): the builder holds the cursor in the game's window on Windows #3073

Merged
HumanBean merged 3 commits from Veix/Longshot:fix/sandbox-clip-cursor into main 2026-12-03 14:33:12 +00:00
Member

Summary

The Windows cursor clip is routed through the builder: in the sandbox, the mouse no longer escapes to other monitors.

Since the sandbox is on by default (#2822), the game runs in an AppContainer on Windows. Windows refuses its
ClipCursor there: the call needs the window station's WINSTA_WRITEATTRIBUTES, which an AppContainer does not get
(error 5, access denied). host/display.c's mouse_capture never looked at the result, so with the mouse camera
captured the cursor was hidden but free, and ran onto the player's other monitors, in fullscreen too (reported on
Discord). SetCursorPos needs the same right, so the game cannot hold the cursor itself in any way.

On main: Windows with two monitors, load a save, click into the game so it takes the mouse, move it toward the other
monitor: the cursor leaves the game. With HOS_SANDBOX=0 it stays.

This PR does it the way the sandbox does the other things the container may not (open, message_box): an op on the
game's channel to its builder.

  • clip_cursor (build_driver::channel, build_core::cursor_clip): {on} alone. The builder takes the window in
    front, checks it is the game's (its process id), reads its client area itself and clips the cursor to it, on a thread
    set per-monitor DPI aware so the rectangle is in the screen's real pixels. The game names no rectangle: one that was
    taken over can hold the cursor nowhere but over its own window. The clip lasts only while the game is in front: the
    builder's own watch looks every 100 ms and lets it go once another window is in front, whatever the game asks. It is
    let go too on on: false and when the channel ends (the game gone, crashed or not). The builder lets go only its own
    clip (the clip now still the rectangle it set), never one another program made since. The Windows calls are
    build_core::sys's, where the builder's unsafe code belongs.
  • The game (host/display.c): its own ClipCursor first (unconfined, HOS_SANDBOX=0, it holds as before); refused,
    it asks the builder (game_builder_clip_cursor, builder_link.rs, which sends {on} alone and waits at most a
    second on the window's thread), and says once in the log which happened. Releasing the capture asks the builder to
    let go whenever it asked, answered or not (a late answer may have clipped it).
  • Docs: the op in build.md's table and mod-ops.md's list, the cursor in sandbox.md's "What the builder does for
    the game".

Linux is not affected: SDL's relative mouse mode is held by the display server (an X11 grab, Wayland's pointer
constraints) over the connection the sandbox leaves open.

Written with AI assistance (Claude).

Testing

Tested: Windows 11, RTX 4070 SUPER, NVIDIA 621.24, two monitors (2560x1440 and a 4K TV), fullscreen on the 2560x1440
one, a save loaded, the mouse captured and pushed toward the other monitor:

  • main 2ca7d4f7 with a log line at the call: sandbox on, ClipCursor failed with error 5 and the cursor left the game;
    HOS_SANDBOX=0, ClipCursor succeeded, the clip read back as 0,0-2560,1440, and the cursor stayed.
  • this PR, sandbox on: the log says display: the cursor's clip refused (error 5): held by the builder, and the cursor
    stayed in the game; alt-tab to another program freed it on both monitors, and back in the game it was held again.
  • cargo test: build-core cursor_clip (5 passed, on a desktop of the test's: no clip for a game not started or
    not in front, let go when the game asks, another program's clip made since never let go, the watch letting go once
    the game is not in front, the watch's thread ending by itself), build-driver channel (18 passed),
    longshot-game builder_link (35 passed, new: the_game_asks_the_cursor_held_with_on_alone); cargo clippy -p build-core -p build-driver --all-targets -D warnings and cargo fmt --check clean.
  • tests/run_all.py: the 32 checks that read host/display.c and those that read the builder ops: passed, but four
    that need a Linux C toolchain (test_key_press_queue, test_net_engine, test_pipeline_tour, test_sandbox_linux),
    which fail the same way on main on this PC. tests/display_pointer_test.cpp takes the new state (builder_clip).

Still to test:

  • Windows, a scaled display (125 % or 150 %) and a window not at the screen's origin: the cursor held to the game's
    window and no further (by hand)
  • Windows, @Beanstalk smoke: the game starts, plays and quits as before

Measurements

Nothing to measure: one request when the capture changes, none per frame; the mouse's input does not go through the builder.

Risks

A builder that does not serve clip_cursor (an older one) leaves the cursor as main does (the game asks only a builder
that says it serves the op). A revert is enough. Players with one monitor notice nothing; with several, the cursor stays
in the game while it is captured.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A check under tests/ that reads changed source is updated, not weakened.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary **The Windows cursor clip is routed through the builder: in the sandbox, the mouse no longer escapes to other monitors.** Since the sandbox is on by default (#2822), the game runs in an AppContainer on Windows. Windows refuses its `ClipCursor` there: the call needs the window station's `WINSTA_WRITEATTRIBUTES`, which an AppContainer does not get (error 5, access denied). `host/display.c`'s `mouse_capture` never looked at the result, so with the mouse camera captured the cursor was hidden but free, and ran onto the player's other monitors, in fullscreen too (reported on Discord). `SetCursorPos` needs the same right, so the game cannot hold the cursor itself in any way. On main: Windows with two monitors, load a save, click into the game so it takes the mouse, move it toward the other monitor: the cursor leaves the game. With `HOS_SANDBOX=0` it stays. This PR does it the way the sandbox does the other things the container may not (`open`, `message_box`): an op on the game's channel to its builder. - **`clip_cursor`** (`build_driver::channel`, `build_core::cursor_clip`): `{on}` alone. The builder takes the window in front, checks it is the game's (its process id), reads its client area itself and clips the cursor to it, on a thread set per-monitor DPI aware so the rectangle is in the screen's real pixels. The game names no rectangle: one that was taken over can hold the cursor nowhere but over its own window. The clip lasts only while the game is in front: the builder's own watch looks every 100 ms and lets it go once another window is in front, whatever the game asks. It is let go too on `on: false` and when the channel ends (the game gone, crashed or not). The builder lets go only its own clip (the clip now still the rectangle it set), never one another program made since. The Windows calls are `build_core::sys`'s, where the builder's `unsafe` code belongs. - **The game** (`host/display.c`): its own `ClipCursor` first (unconfined, `HOS_SANDBOX=0`, it holds as before); refused, it asks the builder (`game_builder_clip_cursor`, `builder_link.rs`, which sends `{on}` alone and waits at most a second on the window's thread), and says once in the log which happened. Releasing the capture asks the builder to let go whenever it asked, answered or not (a late answer may have clipped it). - Docs: the op in `build.md`'s table and `mod-ops.md`'s list, the cursor in `sandbox.md`'s "What the builder does for the game". Linux is not affected: SDL's relative mouse mode is held by the display server (an X11 grab, Wayland's pointer constraints) over the connection the sandbox leaves open. Written with AI assistance (Claude). ## Testing **Tested:** Windows 11, RTX 4070 SUPER, NVIDIA 621.24, two monitors (2560x1440 and a 4K TV), fullscreen on the 2560x1440 one, a save loaded, the mouse captured and pushed toward the other monitor: - main 2ca7d4f7 with a log line at the call: sandbox on, `ClipCursor` failed with error 5 and the cursor left the game; `HOS_SANDBOX=0`, `ClipCursor` succeeded, the clip read back as 0,0-2560,1440, and the cursor stayed. - this PR, sandbox on: the log says `display: the cursor's clip refused (error 5): held by the builder`, and the cursor stayed in the game; alt-tab to another program freed it on both monitors, and back in the game it was held again. - `cargo test`: `build-core` `cursor_clip` (5 passed, on a desktop of the test's: no clip for a game not started or not in front, let go when the game asks, another program's clip made since never let go, the watch letting go once the game is not in front, the watch's thread ending by itself), `build-driver` `channel` (18 passed), `longshot-game` `builder_link` (35 passed, new: `the_game_asks_the_cursor_held_with_on_alone`); `cargo clippy -p build-core -p build-driver --all-targets -D warnings` and `cargo fmt --check` clean. - `tests/run_all.py`: the 32 checks that read `host/display.c` and those that read the builder ops: passed, but four that need a Linux C toolchain (`test_key_press_queue`, `test_net_engine`, `test_pipeline_tour`, `test_sandbox_linux`), which fail the same way on main on this PC. `tests/display_pointer_test.cpp` takes the new state (`builder_clip`). **Still to test:** - Windows, a scaled display (125 % or 150 %) and a window not at the screen's origin: the cursor held to the game's window and no further (by hand) - Windows, `@Beanstalk` smoke: the game starts, plays and quits as before ## Measurements Nothing to measure: one request when the capture changes, none per frame; the mouse's input does not go through the builder. ## Risks A builder that does not serve `clip_cursor` (an older one) leaves the cursor as main does (the game asks only a builder that says it serves the op). A revert is enough. Players with one monitor notice nothing; with several, the cursor stays in the game while it is captured. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [ ] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(sandbox): the builder holds the cursor in the game's window on Windows
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
56570a4abc
In the AppContainer, Windows refuses the game's own ClipCursor (it needs the window station's WINSTA_WRITEATTRIBUTES;
error 5), so with the mouse camera captured the cursor ran onto the player's other monitors. When the game's own clip
is refused, host/display.c asks the builder's new clip_cursor op, and the builder clips the cursor to the client area
of the game's own window, only while that window is in front, in the screen's real pixels (build_core::cursor_clip).
The game names no rectangle. The clip is let go when the game asks and when its channel ends.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Tested in game: Windows 11, RTX 4070 SUPER, two monitors, sandbox on: the game's ClipCursor refused (error 5), held by the builder, the cursor stayed in the game; on main it escaped

Tested in game: Windows 11, RTX 4070 SUPER, two monitors, sandbox on: the game's ClipCursor refused (error 5), held by the builder, the cursor stayed in the game; on main it escaped
Member

Possibly related, for context:

  • PR #3043 fix(input): the cursor hides after the mouse has been still in front of the game window (#892) — Adjacent cursor capture and visibility behavior; changes same host display code
Possibly related, for context: - PR #3043 fix(input): the cursor hides after the mouse has been still in front of the game window (#892) — Adjacent cursor capture and visibility behavior; changes same host display code
Author
Member
@review
BeanBot requested changes 2026-12-03 11:09:54 +00:00
Dismissed
BeanBot left a comment

Recommendation: Request changes. The fix holds the cursor in the reported initial capture case, but it can release another application's clip or leave its own clip active after a timed-out request. It also places unsafe code outside the repository's permitted locations.

The builder clips the Windows cursor on behalf of the sandboxed game. This fixes the reported escape in one tested setup, at the cost of a synchronous builder request on the window thread and new cursor-lifetime handling.

Blocking (3): must change before merging.

  1. L1 builder/crates/build-core/src/cursor_clip.rs:33: The flag records that the builder once set a clip, not that the current system clip is still its own. (more on the line) Do: Track and coordinate clip ownership across focus changes, and do not clear a clip that has since been replaced by another application.
  2. L3 builder/crates/build-core/src/cursor_clip.rs:77: The foreground check occurs only when a request is processed; it does not keep the clip restricted to the time the game is in front. (more on the line) Do: Have the builder independently release its clip when the game loses foreground, and revalidate foreground when applying a clip.
  3. L4 builder/crates/build-core/src/cursor_clip.rs:39: This introduces an unsafe-code allowance outside the locations permitted by the builder's code standard. (more on the line) Do: Move the unsafe Windows calls behind safe wrappers in an allowed system-call module, or obtain and document a change to the repository rule.

Should fix (1): not blocking, but worth doing before merging.

  • L2 host/display.c:357: A timed-out capture request is treated as if the builder cannot later apply the clip, so the corresponding release is skipped. (more on the line) Do: Make capture and release ordered operations whose desired state remains authoritative after a timeout, including cancellation or reconciliation of late requests.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5 builder/crates/build-core/src/cursor_clip.rs:69: The scaled-display and focus-transition behavior remains unverified on Windows. (more on the line) Do: Run the described scaled, offset-window and alt-tab cases on Windows and record the results, including the cursor's bounds and release behavior.

@fix can do L1, L2, L3 and L4.

Questions (1) (not confirmed from the code; they don't hold the recommendation)

  • tests/display_pointer_test.cpp:48: Is there a repository rule requiring a game-free behavioral test for this fallback?

Checks: Still running: 11 checks.

More: does it help, other systems, switches, what was read

Does it help: Yes for the reported initial capture: the author observed the cursor escape on base 2ca7d4f7 and remain in the game on this head, on Windows 11 with two monitors. Scaled displays and focus transitions remain untested.

Other systems: Linux does not call the new host path; the builder returns a refusal there. Windows window movement, resizing, focus changes, other applications using ClipCursor, channel delays and game termination can affect the new clip. The reported run covers initial fullscreen capture only.

Switches: None added, changed or removed.

Reviewed: 56570a4abc against 2ca7d4f741: Read the repository rules, standards, pull request template, commit and full diff; traced the changed cursor implementation, host capture and window events, builder channel and link calls, and relevant test harness. Skimmed the changed reference documentation and surrounding large files. Tooling's AGENTS.md and docs/review-checklist.md were absent. No recorded runs, translations or generated files were changed.; nothing run (a code review).

Checked and fine:

  • The commit records AI assistance with a Co-Authored-By trailer.
  • No game-derived files, generated outputs, third-party changes, renderer API changes or new switches appear in the diff.
  • The builder validates that clip_cursor receives only a boolean on argument and checks the foreground window's process ID before the initial clip.

Testing: Read-only review; no commands from the project, builds or tests were run. The author's Windows game run and reported checks are considered as evidence; CI is still running.

Overlaps and merge order: Not checked; network access was unavailable.


Automated code review by BeanBot (gpt-6.1-terra), asked for by Veix. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The fix holds the cursor in the reported initial capture case, but it can release another application's clip or leave its own clip active after a timed-out request. It also places unsafe code outside the repository's permitted locations. The builder clips the Windows cursor on behalf of the sandboxed game. This fixes the reported escape in one tested setup, at the cost of a synchronous builder request on the window thread and new cursor-lifetime handling. **Blocking (3)**: must change before merging. 1. **L1** `builder/crates/build-core/src/cursor_clip.rs:33`: The flag records that the builder once set a clip, not that the current system clip is still its own. (more on the line) **Do:** Track and coordinate clip ownership across focus changes, and do not clear a clip that has since been replaced by another application. 2. **L3** `builder/crates/build-core/src/cursor_clip.rs:77`: The foreground check occurs only when a request is processed; it does not keep the clip restricted to the time the game is in front. (more on the line) **Do:** Have the builder independently release its clip when the game loses foreground, and revalidate foreground when applying a clip. 3. **L4** `builder/crates/build-core/src/cursor_clip.rs:39`: This introduces an unsafe-code allowance outside the locations permitted by the builder's code standard. (more on the line) **Do:** Move the unsafe Windows calls behind safe wrappers in an allowed system-call module, or obtain and document a change to the repository rule. **Should fix (1)**: not blocking, but worth doing before merging. - **L2** `host/display.c:357`: A timed-out capture request is treated as if the builder cannot later apply the clip, so the corresponding release is skipped. (more on the line) **Do:** Make capture and release ordered operations whose desired state remains authoritative after a timeout, including cancellation or reconciliation of late requests. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5** `builder/crates/build-core/src/cursor_clip.rs:69`: The scaled-display and focus-transition behavior remains unverified on Windows. (more on the line) **Do:** Run the described scaled, offset-window and alt-tab cases on Windows and record the results, including the cursor's bounds and release behavior. `@fix` can do L1, L2, L3 and L4. **Questions (1)** (not confirmed from the code; they don't hold the recommendation) - `tests/display_pointer_test.cpp:48`: Is there a repository rule requiring a game-free behavioral test for this fallback? **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the reported initial capture: the author observed the cursor escape on base 2ca7d4f7 and remain in the game on this head, on Windows 11 with two monitors. Scaled displays and focus transitions remain untested. **Other systems:** Linux does not call the new host path; the builder returns a refusal there. Windows window movement, resizing, focus changes, other applications using ClipCursor, channel delays and game termination can affect the new clip. The reported run covers initial fullscreen capture only. **Switches:** None added, changed or removed. **Reviewed:** 56570a4abc7e against 2ca7d4f74182: Read the repository rules, standards, pull request template, commit and full diff; traced the changed cursor implementation, host capture and window events, builder channel and link calls, and relevant test harness. Skimmed the changed reference documentation and surrounding large files. Tooling's AGENTS.md and docs/review-checklist.md were absent. No recorded runs, translations or generated files were changed.; nothing run (a code review). **Checked and fine:** - The commit records AI assistance with a Co-Authored-By trailer. - No game-derived files, generated outputs, third-party changes, renderer API changes or new switches appear in the diff. - The builder validates that clip_cursor receives only a boolean on argument and checks the foreground window's process ID before the initial clip. **Testing:** Read-only review; no commands from the project, builds or tests were run. The author's Windows game run and reported checks are considered as evidence; CI is still running. **Overlaps and merge order:** Not checked; network access was unavailable. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by Veix. Nothing was run; a maintainer decides.</sub>
@ -0,0 +30,4 @@
/// A clip the builder made let go (the game's channel ended); nothing when it holds none, so another program's clip
/// stays.
pub fn release() {
if HELD.swap(false, Ordering::SeqCst) {
Member

L1 (blocking): The flag records that the builder once set a clip, not that the current system clip is still its own. Releasing it can therefore remove another application's clip.

When: The game holds a clip, the player switches to another application and that application sets its own clip before the game's release request is served. HELD is still true, so release calls ClipCursor(NULL) and removes the other application's confinement.

Do: Track and coordinate clip ownership across focus changes, and do not clear a clip that has since been replaced by another application.

**L1** (blocking): The flag records that the builder once set a clip, not that the current system clip is still its own. Releasing it can therefore remove another application's clip. *When:* The game holds a clip, the player switches to another application and that application sets its own clip before the game's release request is served. HELD is still true, so release calls ClipCursor(NULL) and removes the other application's confinement. **Do:** Track and coordinate clip ownership across focus changes, and do not clear a clip that has since been replaced by another application.
@ -0,0 +36,4 @@
}
#[cfg(windows)]
#[allow(unsafe_code)]
Member

L4 (blocking): This introduces an unsafe-code allowance outside the locations permitted by the builder's code standard.

When: The new Windows module contains unsafe Windows calls in cursor_clip.rs, while docs/dev/standards.md permits unsafe builder code only in the named system-call modules.

Do: Move the unsafe Windows calls behind safe wrappers in an allowed system-call module, or obtain and document a change to the repository rule.

**L4** (blocking): This introduces an unsafe-code allowance outside the locations permitted by the builder's code standard. *When:* The new Windows module contains unsafe Windows calls in cursor_clip.rs, while docs/dev/standards.md permits unsafe builder code only in the named system-call modules. **Do:** Move the unsafe Windows calls behind safe wrappers in an allowed system-call module, or obtain and document a change to the repository rule.
@ -0,0 +66,4 @@
if pid == 0 {
return Err("the game has not started".into());
}
let _aware = PerMonitor::new();
Member

L5 (should fix): The scaled-display and focus-transition behavior remains unverified on Windows.

When: The only reported run uses fullscreen on the primary monitor; it does not show whether a scaled, offset window receives the correct clip or whether switching away releases it.

Do: Run the described scaled, offset-window and alt-tab cases on Windows and record the results, including the cursor's bounds and release behavior.

**L5** (should fix): The scaled-display and focus-transition behavior remains unverified on Windows. *When:* The only reported run uses fullscreen on the primary monitor; it does not show whether a scaled, offset window receives the correct clip or whether switching away releases it. **Do:** Run the described scaled, offset-window and alt-tab cases on Windows and record the results, including the cursor's bounds and release behavior.
@ -0,0 +74,4 @@
// SAFETY: a window handle Windows just gave; one closed since leaves `owner` 0.
unsafe { GetWindowThreadProcessId(window, &mut owner) };
}
if window.is_null() || owner != pid {
Member

L3 (blocking): The foreground check occurs only when a request is processed; it does not keep the clip restricted to the time the game is in front.

When: A compromised game requests a clip while its window is foreground and then fails to send the release on focus loss. The builder keeps the system-wide clip until the channel closes, so the cursor remains confined while another application is foreground.

Do: Have the builder independently release its clip when the game loses foreground, and revalidate foreground when applying a clip.

**L3** (blocking): The foreground check occurs only when a request is processed; it does not keep the clip restricted to the time the game is in front. *When:* A compromised game requests a clip while its window is foreground and then fails to send the release on focus loss. The builder keeps the system-wide clip until the channel closes, so the cursor remains confined while another application is foreground. **Do:** Have the builder independently release its clip when the game loses foreground, and revalidate foreground when applying a clip.
host/display.c Outdated
@ -349,0 +354,4 @@
/* (refused: the sandbox's AppContainer has no WINSTA_WRITEATTRIBUTES, error 5, and the cursor would run onto the
other monitors; the builder holds it in this window for the game, its window in front alone) */
const DWORD err = GetLastError();
builder_clip = game_builder_clip_cursor(1) == 1;
Member

L2 (should fix): A timed-out capture request is treated as if the builder cannot later apply the clip, so the corresponding release is skipped.

When: The builder's channel is delayed for more than the 30-second call timeout. The window thread records builder_clip as false; the builder can subsequently process the queued on request and clip the cursor, but focus loss and release send no off request, leaving the cursor confined until the channel ends.

Do: Make capture and release ordered operations whose desired state remains authoritative after a timeout, including cancellation or reconciliation of late requests.

**L2** (should fix): A timed-out capture request is treated as if the builder cannot later apply the clip, so the corresponding release is skipped. *When:* The builder's channel is delayed for more than the 30-second call timeout. The window thread records builder_clip as false; the builder can subsequently process the queued on request and clip the cursor, but focus loss and release send no off request, leaving the cursor confined until the channel ends. **Do:** Make capture and release ordered operations whose desired state remains authoritative after a timeout, including cancellation or reconciliation of late requests.
fix(sandbox): the builder's cursor clip lasts only while the game is in front, and is only ever its own
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
b2b820e519
From the review: the builder lets go only its own clip (the clip now still the rectangle it set, so another program's
made since stays); a watch of its own lets the clip go once the game's window is no longer in front, whatever the
game asks; the Windows calls are build_core::sys's, the module the builder's unsafe code is allowed in; the game waits
at most a second for the answer on its window's thread, and lets go whenever it asked, answered or not.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member
@review
BeanBot requested changes 2026-12-03 11:22:40 +00:00
Dismissed
BeanBot left a comment

Recommendation: Request changes. The builder can still release another application's cursor clip, and a foreground-window race can clip the cursor to a different application's window. The scaled-display behavior also remains unverified.

The change lets the builder confine the cursor for a sandboxed Windows game and releases it on focus loss or channel shutdown. It fixes the reported escape on the tested setup, at the cost of a polling thread and additional synchronization that still needs correction.

Blocking (1): must change before merging.

  1. L1 builder/crates/build-core/src/cursor_clip.rs:33: The flag records that the builder once set a clip, not that the current system clip is still its own. Releasing it can therefore remove another application's clip. When: The game holds a clip, the player switches to another application and that application sets its own clip before the game's release request is served. HELD is still true, so release calls ClipCursor(NULL) and removes the other application's confinement. Do: Track and coordinate clip ownership across focus changes, and do not clear a clip that has since been replaced by another application.

Should fix (1): not blocking, but worth doing before merging.

  • L6 builder/crates/build-core/src/sys.rs:827: The foreground process check reads a different foreground window from the one whose client rectangle is used. (more on the line) Do: Get the process ID from the same window handle whose client rectangle is read, and recheck foreground ownership before applying the clip.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5 builder/crates/build-core/src/cursor_clip.rs:69: The scaled-display and focus-transition behavior remains unverified on Windows. When: The only reported run uses fullscreen on the primary monitor; it does not show whether a scaled, offset window receives the correct clip or whether switching away releases it. Do: Run the described scaled, offset-window and alt-tab cases on Windows and record the results, including the cursor's bounds and release behavior.

@fix can do L1 and L6.

Since the last review (on 56570a4abc)
Resolved: L2 (A timed-out capture request is treated as if the builder cannot later apply the clip, so t…); L3 (The foreground check occurs only when a request is processed; it does not keep the clip re…); L4 (This introduces an unsafe-code allowance outside the locations permitted by the builder's…)
Still open: L1 (The flag records that the builder once set a clip, not that the current system clip is sti…); L5 (The scaled-display and focus-transition behavior remains unverified on Windows.)
New: L6 (The foreground process check reads a different foreground window from the one whose client…)

Checks: Still running: 11 checks.

More: does it help, other systems, switches, what was read

Does it help: Yes: the author reports that the cursor escaped on main and stayed in the game with this change on Windows 11 with two monitors; alt-tab released it. Scaled and offset windows remain untested.

Other systems: The new cursor operation is Windows-specific; Linux returns an error and retains its existing pointer handling. Unconfined Windows games continue to use their own ClipCursor call. Focus transitions and other applications' cursor clips share the affected Windows desktop state.

Switches: None.

Reviewed: b2b820e519 against 2ca7d4f741: Read the cursor-clip implementation and its changed system calls, the capture and builder-link changes, channel diff, related documentation and tests, project rules, standards and pull request template. The remaining surrounding files and recorded runs were skimmed; the full contents of every changed code file were not read.; nothing run (a code review).

Checked and fine:

  • The channel accepts only the on boolean and does not accept a game-supplied rectangle.
  • The game requests release after a timed-out capture request.
  • The Windows calls were moved into the permitted system module.

Testing: The author reports an in-game Windows comparison and focus transition, plus game-free checks. A scaled display and offset window still need a Windows run; CI is still running. No commands from the pull request were run for this review.

Overlaps and merge order: Not checked; network access is closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by Veix. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The builder can still release another application's cursor clip, and a foreground-window race can clip the cursor to a different application's window. The scaled-display behavior also remains unverified. The change lets the builder confine the cursor for a sandboxed Windows game and releases it on focus loss or channel shutdown. It fixes the reported escape on the tested setup, at the cost of a polling thread and additional synchronization that still needs correction. **Blocking (1)**: must change before merging. 1. **L1** `builder/crates/build-core/src/cursor_clip.rs:33`: The flag records that the builder once set a clip, not that the current system clip is still its own. Releasing it can therefore remove another application's clip. *When:* The game holds a clip, the player switches to another application and that application sets its own clip before the game's release request is served. HELD is still true, so release calls ClipCursor(NULL) and removes the other application's confinement. **Do:** Track and coordinate clip ownership across focus changes, and do not clear a clip that has since been replaced by another application. **Should fix (1)**: not blocking, but worth doing before merging. - **L6** `builder/crates/build-core/src/sys.rs:827`: The foreground process check reads a different foreground window from the one whose client rectangle is used. (more on the line) **Do:** Get the process ID from the same window handle whose client rectangle is read, and recheck foreground ownership before applying the clip. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5** `builder/crates/build-core/src/cursor_clip.rs:69`: The scaled-display and focus-transition behavior remains unverified on Windows. *When:* The only reported run uses fullscreen on the primary monitor; it does not show whether a scaled, offset window receives the correct clip or whether switching away releases it. **Do:** Run the described scaled, offset-window and alt-tab cases on Windows and record the results, including the cursor's bounds and release behavior. `@fix` can do L1 and L6. **Since the last review** (on 56570a4abc7e) Resolved: L2 (A timed-out capture request is treated as if the builder cannot later apply the clip, so t…); L3 (The foreground check occurs only when a request is processed; it does not keep the clip re…); L4 (This introduces an unsafe-code allowance outside the locations permitted by the builder's…) Still open: L1 (The flag records that the builder once set a clip, not that the current system clip is sti…); L5 (The scaled-display and focus-transition behavior remains unverified on Windows.) New: L6 (The foreground process check reads a different foreground window from the one whose client…) **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes: the author reports that the cursor escaped on main and stayed in the game with this change on Windows 11 with two monitors; alt-tab released it. Scaled and offset windows remain untested. **Other systems:** The new cursor operation is Windows-specific; Linux returns an error and retains its existing pointer handling. Unconfined Windows games continue to use their own ClipCursor call. Focus transitions and other applications' cursor clips share the affected Windows desktop state. **Switches:** None. **Reviewed:** b2b820e5190b against 2ca7d4f74182: Read the cursor-clip implementation and its changed system calls, the capture and builder-link changes, channel diff, related documentation and tests, project rules, standards and pull request template. The remaining surrounding files and recorded runs were skimmed; the full contents of every changed code file were not read.; nothing run (a code review). **Checked and fine:** - The channel accepts only the on boolean and does not accept a game-supplied rectangle. - The game requests release after a timed-out capture request. - The Windows calls were moved into the permitted system module. **Testing:** The author reports an in-game Windows comparison and focus transition, plus game-free checks. A scaled display and offset window still need a Windows run; CI is still running. No commands from the pull request were run for this review. **Overlaps and merge order:** Not checked; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by Veix. Nothing was run; a maintainer decides.</sub>
@ -750,0 +824,4 @@
pub(super) fn clip_cursor_to_front(pid: u32) -> Result<[i32; 4], String> {
use windows_sys::Win32::UI::WindowsAndMessaging::{ClipCursor, GetForegroundWindow, GetWindowInfo, WINDOWINFO};
let _aware = PerMonitor::new();
// SAFETY: no argument; a null window when none is in front.
Member

L6 (should fix): The foreground process check reads a different foreground window from the one whose client rectangle is used.

When: If focus moves from another application's window to the game between the two GetForegroundWindow calls, front_window_pid accepts the game but GetWindowInfo reads the earlier application's window, so the builder clips the cursor to that window.

Do: Get the process ID from the same window handle whose client rectangle is read, and recheck foreground ownership before applying the clip.

**L6** (should fix): The foreground process check reads a different foreground window from the one whose client rectangle is used. *When:* If focus moves from another application's window to the game between the two GetForegroundWindow calls, front_window_pid accepts the game but GetWindowInfo reads the earlier application's window, so the builder clips the cursor to that window. **Do:** Get the process ID from the same window handle whose client rectangle is read, and recheck foreground ownership before applying the clip.
Author
Member

L6: fixed in cebcbe8ba: one window handle throughout. Its owner is checked, its client area read, and it is checked to still be the window in front just before ClipCursor.

L1: addressed in b2b820e51. The HELD flag this comment describes is gone: the builder remembers the rectangle it set and releases only when GetClipCursor still returns exactly that rectangle (cursor_clip.rs release_with, test a_clip_another_program_made_since_is_never_let_go). What remains is what Windows can't tell apart: a clip records no owner, so another program setting the identical rectangle (a second fullscreen program on the same monitor) can't be distinguished from ours, and a clip set in the microseconds between GetClipCursor and ClipCursor(NULL) could be lost. There is no API to do better.

**L6:** fixed in cebcbe8ba: one window handle throughout. Its owner is checked, its client area read, and it is checked to still be the window in front just before `ClipCursor`. **L1:** addressed in b2b820e51. The `HELD` flag this comment describes is gone: the builder remembers the rectangle it set and releases only when `GetClipCursor` still returns exactly that rectangle (`cursor_clip.rs` `release_with`, test `a_clip_another_program_made_since_is_never_let_go`). What remains is what Windows can't tell apart: a clip records no owner, so another program setting the identical rectangle (a second fullscreen program on the same monitor) can't be distinguished from ours, and a clip set in the microseconds between `GetClipCursor` and `ClipCursor(NULL)` could be lost. There is no API to do better.
fix(sandbox): the cursor's clip takes one window throughout, still in front when it is made
Some checks failed
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Failing after 8s
cebcbe8ba4
From the review: the window in front was read twice, once for its owner and once for its client area, so focus moving
between the two could clip the cursor to another program's window. One handle now: its owner checked, its client area
read, and it still the window in front just before ClipCursor.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member
@review
BeanBot requested changes 2026-12-03 11:27:38 +00:00
Dismissed
BeanBot left a comment

Recommendation: Request changes. The builder can still release another application's cursor clip when that application sets the same rectangle or changes the clip between the check and release. The scaled, offset-window case also remains untested.

The builder confines the cursor for the sandboxed Windows game when the game's own call is refused. The reported two-monitor test shows the intended benefit, at the cost of a remaining risk to another application's clip.

Blocking (1): must change before merging.

  1. L1 builder/crates/build-core/src/cursor_clip.rs:33: The flag records that the builder once set a clip, not that the current system clip is still its own. Releasing it can therefore remove another application's clip. When: The game holds a clip, the player switches to another application and that application sets its own clip before the game's release request is served. HELD is still true, so release calls ClipCursor(NULL) and removes the other application's confinement. Do: Track and coordinate clip ownership across focus changes, and do not clear a clip that has since been replaced by another application.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5 builder/crates/build-core/src/cursor_clip.rs:69: The scaled-display and focus-transition behavior remains unverified on Windows. When: The only reported run uses fullscreen on the primary monitor; it does not show whether a scaled, offset window receives the correct clip or whether switching away releases it. Do: Run the described scaled, offset-window and alt-tab cases on Windows and record the results, including the cursor's bounds and release behavior.

@fix can do L1.

Since the last review (on b2b820e519)
Resolved: L6 (The foreground process check reads a different foreground window from the one whose client…)
Still open: L1 (The flag records that the builder once set a clip, not that the current system clip is sti…); L5 (The scaled-display and focus-transition behavior remains unverified on Windows.)

Checks: Still running: 11 checks.

More: does it help, other systems, switches, what was read

Does it help: Yes: the author reports that the cursor escaped on main and stayed in the game on this PR on Windows 11 with two monitors. Scaled and offset windows remain unverified.

Other systems: The new clipping calls target Windows; Linux continues to use SDL relative mouse mode. The author tested an unconfined Windows game on main and sandboxed focus transitions on the PR; scaled displays remain outstanding.

Switches: None added, changed or removed.

Reviewed: cebcbe8ba4 against 2ca7d4f741: Read cursor_clip.rs and the changed Windows sys.rs functions in full, the changes to the channel, game link, host display, documentation and tests, and the repository rules and PR template. The larger existing files and their callers were only skimmed; the full changed code was not read.; nothing run (a code review).

Checked and fine:

  • The changed foreground-window check uses one handle for the owner and client rectangle.
  • The game sends only the on flag, and the builder rejects extra clip_cursor arguments.

Testing: No commands that build or run the project were executed. The author reports a Windows in-game test and passing targeted checks; CI is still running.

Overlaps and merge order: Not established from the available information.


Automated code review by BeanBot (gpt-6.1-terra), asked for by Veix. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The builder can still release another application's cursor clip when that application sets the same rectangle or changes the clip between the check and release. The scaled, offset-window case also remains untested. The builder confines the cursor for the sandboxed Windows game when the game's own call is refused. The reported two-monitor test shows the intended benefit, at the cost of a remaining risk to another application's clip. **Blocking (1)**: must change before merging. 1. **L1** `builder/crates/build-core/src/cursor_clip.rs:33`: The flag records that the builder once set a clip, not that the current system clip is still its own. Releasing it can therefore remove another application's clip. *When:* The game holds a clip, the player switches to another application and that application sets its own clip before the game's release request is served. HELD is still true, so release calls ClipCursor(NULL) and removes the other application's confinement. **Do:** Track and coordinate clip ownership across focus changes, and do not clear a clip that has since been replaced by another application. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5** `builder/crates/build-core/src/cursor_clip.rs:69`: The scaled-display and focus-transition behavior remains unverified on Windows. *When:* The only reported run uses fullscreen on the primary monitor; it does not show whether a scaled, offset window receives the correct clip or whether switching away releases it. **Do:** Run the described scaled, offset-window and alt-tab cases on Windows and record the results, including the cursor's bounds and release behavior. `@fix` can do L1. **Since the last review** (on b2b820e5190b) Resolved: L6 (The foreground process check reads a different foreground window from the one whose client…) Still open: L1 (The flag records that the builder once set a clip, not that the current system clip is sti…); L5 (The scaled-display and focus-transition behavior remains unverified on Windows.) **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes: the author reports that the cursor escaped on main and stayed in the game on this PR on Windows 11 with two monitors. Scaled and offset windows remain unverified. **Other systems:** The new clipping calls target Windows; Linux continues to use SDL relative mouse mode. The author tested an unconfined Windows game on main and sandboxed focus transitions on the PR; scaled displays remain outstanding. **Switches:** None added, changed or removed. **Reviewed:** cebcbe8ba43e against 2ca7d4f74182: Read cursor_clip.rs and the changed Windows sys.rs functions in full, the changes to the channel, game link, host display, documentation and tests, and the repository rules and PR template. The larger existing files and their callers were only skimmed; the full changed code was not read.; nothing run (a code review). **Checked and fine:** - The changed foreground-window check uses one handle for the owner and client rectangle. - The game sends only the on flag, and the builder rejects extra clip_cursor arguments. **Testing:** No commands that build or run the project were executed. The author reports a Windows in-game test and passing targeted checks; CI is still running. **Overlaps and merge order:** Not established from the available information. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by Veix. Nothing was run; a maintainer decides.</sub>
Author
Member

L1: the text still describes the removed HELD flag. The two residual cases (an identical rectangle set by another program, a clip set between GetClipCursor and ClipCursor(NULL)) can't be told apart by any Windows API, since a clip records no owner. For comparison, main's own unsandboxed path in host/display.c releases with a plain ClipCursor(NULL) and no check at all; this PR's builder path only releases a clip that is still exactly its own. Leaving this to a maintainer.

**L1:** the text still describes the removed `HELD` flag. The two residual cases (an identical rectangle set by another program, a clip set between `GetClipCursor` and `ClipCursor(NULL)`) can't be told apart by any Windows API, since a clip records no owner. For comparison, main's own unsandboxed path in `host/display.c` releases with a plain `ClipCursor(NULL)` and no check at all; this PR's builder path only releases a clip that is still exactly its own. Leaving this to a maintainer.
Member
@review
BeanBot left a comment

Recommendation: Request changes. The builder can still release another application's cursor clip when that application uses the same rectangle or changes its clip between the check and release. The scaled-display and offset-window behavior also awaits a Windows run.

The builder confines the sandboxed game's cursor to its foreground window, fixing the reported multi-monitor escape in the author's Windows test. The change adds a watcher and shared cursor state, but its ownership check cannot reliably distinguish every other application's clip.

Blocking (1): must change before merging.

  1. L1 builder/crates/build-core/src/cursor_clip.rs:33: The flag records that the builder once set a clip, not that the current system clip is still its own. Releasing it can therefore remove another application's clip. When: The game holds a clip, the player switches to another application and that application sets its own clip before the game's release request is served. HELD is still true, so release calls ClipCursor(NULL) and removes the other application's confinement. Do: Track and coordinate clip ownership across focus changes, and do not clear a clip that has since been replaced by another application.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5 builder/crates/build-core/src/cursor_clip.rs:69: The scaled-display and focus-transition behavior remains unverified on Windows. When: The only reported run uses fullscreen on the primary monitor; it does not show whether a scaled, offset window receives the correct clip or whether switching away releases it. Do: Run the described scaled, offset-window and alt-tab cases on Windows and record the results, including the cursor's bounds and release behavior.

@fix can do L1.

Since the last review (on cebcbe8ba4)
Still open: L1 (The flag records that the builder once set a clip, not that the current system clip is sti…); L5 (The scaled-display and focus-transition behavior remains unverified on Windows.)

Checks: Still running: 11 checks.

More: does it help, other systems, switches, what was read

Does it help: Yes for the reported case: the author reports that the cursor escaped on main and stayed in the game on this PR on Windows 11 with two monitors. Scaled and offset windows remain untested.

Other systems: The new clipping path uses Windows window and DPI APIs; the author tested an unscaled Windows 11 NVIDIA setup and an alt-tab transition. Linux uses its existing display-server relative mouse handling and is not exercised by the Windows clipping path.

Switches: None added, changed, or removed.

Reviewed: cebcbe8ba4 against 2ca7d4f741: Read AGENTS.md, CONTRIBUTING.md, the pull request template, cursor_clip.rs, the supplied description, comments, CI and ledger. Skimmed the pull request diff and commit list; the remaining changed code files and their callers were not read in full. docs/review-checklist.md and ../Tooling/AGENTS.md were unavailable.; nothing run (a code review).

Checked and fine:

  • The builder rejects a request with a caller-supplied rectangle and obtains the foreground game's client area itself.
  • The author reports the sandboxed cursor remained confined and was freed on alt-tab in the tested setup.

Testing: No commands that build or run project code were executed. The author reports in-game Windows testing and game-free checks; CI is still running. A scaled Windows display with an offset game window remains to be tested.

Overlaps and merge order: Not checked; network access is closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The builder can still release another application's cursor clip when that application uses the same rectangle or changes its clip between the check and release. The scaled-display and offset-window behavior also awaits a Windows run. The builder confines the sandboxed game's cursor to its foreground window, fixing the reported multi-monitor escape in the author's Windows test. The change adds a watcher and shared cursor state, but its ownership check cannot reliably distinguish every other application's clip. **Blocking (1)**: must change before merging. 1. **L1** `builder/crates/build-core/src/cursor_clip.rs:33`: The flag records that the builder once set a clip, not that the current system clip is still its own. Releasing it can therefore remove another application's clip. *When:* The game holds a clip, the player switches to another application and that application sets its own clip before the game's release request is served. HELD is still true, so release calls ClipCursor(NULL) and removes the other application's confinement. **Do:** Track and coordinate clip ownership across focus changes, and do not clear a clip that has since been replaced by another application. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5** `builder/crates/build-core/src/cursor_clip.rs:69`: The scaled-display and focus-transition behavior remains unverified on Windows. *When:* The only reported run uses fullscreen on the primary monitor; it does not show whether a scaled, offset window receives the correct clip or whether switching away releases it. **Do:** Run the described scaled, offset-window and alt-tab cases on Windows and record the results, including the cursor's bounds and release behavior. `@fix` can do L1. **Since the last review** (on cebcbe8ba43e) Still open: L1 (The flag records that the builder once set a clip, not that the current system clip is sti…); L5 (The scaled-display and focus-transition behavior remains unverified on Windows.) **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the reported case: the author reports that the cursor escaped on main and stayed in the game on this PR on Windows 11 with two monitors. Scaled and offset windows remain untested. **Other systems:** The new clipping path uses Windows window and DPI APIs; the author tested an unscaled Windows 11 NVIDIA setup and an alt-tab transition. Linux uses its existing display-server relative mouse handling and is not exercised by the Windows clipping path. **Switches:** None added, changed, or removed. **Reviewed:** cebcbe8ba43e against 2ca7d4f74182: Read AGENTS.md, CONTRIBUTING.md, the pull request template, cursor_clip.rs, the supplied description, comments, CI and ledger. Skimmed the pull request diff and commit list; the remaining changed code files and their callers were not read in full. docs/review-checklist.md and ../Tooling/AGENTS.md were unavailable.; nothing run (a code review). **Checked and fine:** - The builder rejects a request with a caller-supplied rectangle and obtains the foreground game's client area itself. - The author reports the sandboxed cursor remained confined and was freed on alt-tab in the tested setup. **Testing:** No commands that build or run project code were executed. The author reports in-game Windows testing and game-free checks; CI is still running. A scaled Windows display with an offset game window remains to be tested. **Overlaps and merge order:** Not checked; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
HumanBean deleted branch fix/sandbox-clip-cursor 2026-12-03 14:33:12 +00:00
Some checks failed
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Failing after 8s
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
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
MagicBeanDev/Longshot!3073
No description provided.