feat(hle): add opt-in hidden window mode for lifecycle stand-in #3284

Open
github-bot wants to merge 1 commit from github-bot/gh-3284 into main AGit
Owner

@⁠legayclightning22 on GitHub · 2026-11-26 15:49 UTC · original
legayclightning22:feat/hidden-window-mode → main · +40 −0 · 1 files · 1 commits · open

Summary

Adds an opt-in hidden-window presentation mode in crates/victory-hle/src/modules/lifecycle.rs so unattended or background runs do not interfere with desktop focus or taskbar state while keeping swap-chain presentation active.

Changes

  • When VICTORY_HIDDEN_WINDOW=1 is set, top-level windows created via CreateWindowExW/CreateWindowExA receive WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE and are positioned off-screen at (-32000, -32000) without altering swap-chain presentation.
  • Add unit tests covering hidden-window style and coordinate transformation.

Verification

  • cargo check -p victory-hle --all-targets
  • cargo clippy --locked -p victory-hle --all-targets -- -D warnings
  • cargo test -p victory-hle --lib
  • cargo xtask policy
**@⁠legayclightning22** on GitHub · 2026-11-26 15:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/3284) `legayclightning22:feat/hidden-window-mode` → `main` · +40 −0 · 1 files · 1 commits · open ## Summary Adds an opt-in hidden-window presentation mode in `crates/victory-hle/src/modules/lifecycle.rs` so unattended or background runs do not interfere with desktop focus or taskbar state while keeping swap-chain presentation active. ## Changes - When `VICTORY_HIDDEN_WINDOW=1` is set, top-level windows created via `CreateWindowExW`/`CreateWindowExA` receive `WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE` and are positioned off-screen at `(-32000, -32000)` without altering swap-chain presentation. - Add unit tests covering hidden-window style and coordinate transformation. ## Verification - `cargo check -p victory-hle --all-targets` - `cargo clippy --locked -p victory-hle --all-targets -- -D warnings` - `cargo test -p victory-hle --lib` - `cargo xtask policy`
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 15:53:20 +00:00
Author
Owner

@⁠cloph-dsp on GitHub · 2026-11-26 16:00 UTC · original

Independent Windows verification. Head 434c475, Rust 1.100.0/MSVC, worktree-local CARGO_TARGET_DIR (target-3284), no game data.

  • cargo test --locked -p victory-hle --lib -- --exact modules::lifecycle::tests::hidden_window_mode_leaves_normal_windows_alone modules::lifecycle::tests::hidden_window_mode_moves_and_hides_window_without_touching_size -> 2 passed, 0 failed, 152 filtered, exit 0.
  • git diff --check origin/main HEAD clean; both test names absent on merge base 63bcca4.
  • Caveat: these are synthetic helper tests; I did not create real windows or check desktop focus/taskbar/swap-chain behaviour.

AI-assisted (Hy4 flash). GPU/driver N/A (CPU-only HLE tests). No game data.

**@⁠cloph-dsp** on GitHub · 2026-11-26 16:00 UTC · [original](https://github.com/Marvisak/VIctory/pull/3284#issuecomment-7197055226) Independent Windows verification. Head 434c475, Rust 1.100.0/MSVC, worktree-local CARGO_TARGET_DIR (target-3284), no game data. - `cargo test --locked -p victory-hle --lib -- --exact modules::lifecycle::tests::hidden_window_mode_leaves_normal_windows_alone modules::lifecycle::tests::hidden_window_mode_moves_and_hides_window_without_touching_size` -> 2 passed, 0 failed, 152 filtered, exit 0. - `git diff --check origin/main HEAD` clean; both test names absent on merge base 63bcca4. - Caveat: these are synthetic helper tests; I did not create real windows or check desktop focus/taskbar/swap-chain behaviour. AI-assisted (Hy4 flash). GPU/driver N/A (CPU-only HLE tests). No game data.
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-26 16:10 UTC · original · approved these changes

Reviewed the diff and verified locally on Windows 11 x64:

  • Standalone opt-in VICTORY_HIDDEN_WINDOW=1 cleanly adds WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE and moves the stand-in window offscreen without altering default behavior when unset. (Note: overlaps the lifecycle.rs hunk in #3271.)
  • cargo test -p victory-hle --lib modules::lifecycle:: -- --test-threads=1: 14 passed, 0 failed (including hidden_window_mode_leaves_normal_windows_alone and hidden_window_mode_moves_and_hides_window_without_touching_size).
  • cargo clippy -p victory-hle --all-targets -- -D warnings: clean.
  • cargo xtask policy: 191 files ok.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

**@⁠Dukestar69** on GitHub · 2026-11-26 16:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/3284#pullrequestreview-6077311373) · **approved these changes** Reviewed the diff and verified locally on Windows 11 x64: - Standalone opt-in `VICTORY_HIDDEN_WINDOW=1` cleanly adds `WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE` and moves the stand-in window offscreen without altering default behavior when unset. (Note: overlaps the `lifecycle.rs` hunk in #3271.) - `cargo test -p victory-hle --lib modules::lifecycle:: -- --test-threads=1`: 14 passed, 0 failed (including `hidden_window_mode_leaves_normal_windows_alone` and `hidden_window_mode_moves_and_hides_window_without_touching_size`). - `cargo clippy -p victory-hle --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 191 files ok. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Author
Owner

@⁠legayclightning22 on GitHub · 2026-11-26 16:21 UTC · original

Rebased cleanly onto upstream/main and verified cargo test -p victory-hle --lib (154 passed), cargo clippy --locked -p victory-hle --all-targets -- -D warnings, and cargo xtask policy.

**@⁠legayclightning22** on GitHub · 2026-11-26 16:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/3284#issuecomment-7197533711) Rebased cleanly onto `upstream/main` and verified `cargo test -p victory-hle --lib` (154 passed), `cargo clippy --locked -p victory-hle --all-targets -- -D warnings`, and `cargo xtask policy`.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3284/head:github-bot/gh-3284'
git switch 'github-bot/gh-3284'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3284'
git switch 'github-bot/gh-3284'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3284'
git switch 'github-bot/gh-3284'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3284'
git switch 'main'
git merge --squash 'github-bot/gh-3284'
git switch 'main'
git merge --ff-only 'github-bot/gh-3284'
git switch 'main'
git merge 'github-bot/gh-3284'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
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
github/Marvisak--VIctory!3284
No description provided.