user: hide title console window when DWM cloaking is unavailable (#175) #788

Open
gsucristo wants to merge 1 commit from upstream-pr/794 into main
gsucristo commented 2026-11-24 05:33:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gsucristo on 2026-11-24T05:33:12Z.


Keep the title's 1920x1080 console window hidden when DWM window cloaking is unavailable (as under Wine), where DwmSetWindowAttribute(DWMWA_CLOAK) fails or leaves DWMWA_CLOAKED == 0 and causes the title's blank window to cover XCL's presenter window. Part of #175.

What is in it

  • crates/xcl/src/hle/user.rs: query DwmGetWindowAttribute(DWMWA_CLOAKED) after DwmSetWindowAttribute(DWMWA_CLOAK); if cloaking did not take effect, call ShowWindow(hwnd, SW_HIDE) and strip SWP_SHOWWINDOW in console_wndproc on WM_WINDOWPOSCHANGING so subsequent title show calls keep it hidden while keeping its 1920x1080 client rect.
  • crates/xcl/src/hle/user.rs (tests): add console_window_stays_hidden_when_uncloaked.

Tested

  • NVIDIA GeForce RTX 4090 (driver 610.57.04), AMD Ryzen 9 7950X3D, Linux + Proton Experimental / vkd3d-proton (relaxed vtable check), rustc 1.98.1 (x86_64-pc-windows-msvc cross-compile), debug.
  • cargo test --workspace --no-fail-fast --target x86_64-pc-windows-msvc -- --test-threads=4 --skip a_freed_block_is_decommitted_before_its_address_is_reused: 700 passed, 4 failed (pre-existing Wine-only failures: hle::xaudio2::tests::xma2_source_voice_decodes_and_manages_lifetime, test_title_runs_and_game_folder_is_untouched, disk_free_space_ex_reports_pls_quota, set_predication_buffer_state_and_kickoff), 41 ignored, 1 filtered (a_freed_block_is_decommitted_before_its_address_is_reused).
  • SKIPPED GPU tests: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64).
  • New test passed: hle::user::tests::console_window_stays_hidden_when_uncloaked (verified IsWindowVisible == 0 under Wine after ShowWindow(SW_SHOW) and SetWindowPos(SWP_SHOWWINDOW)).

Regression run

  • Pending native Windows scripts/smoke.ps1 runs on a retail title (Linux/Proton environment only).

Not tested

  • Native Windows 10/11 DWM-cloaked branch (cloaked != 0), AMD RDNA, scripts/smoke.ps1 retail regression run.

AI use

  • Antigravity (Google DeepMind; exact model version not exposed to the agent) — assisted with code, test, and PR description; reviewed, built, and run on hardware by the author.
<!-- greyfinch-sync:ivall/xcl:issue:5466714714 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/794). Originally posted by [gsucristo](https://github.com/gsucristo) on 2026-11-24T05:33:12Z. --- Keep the title's 1920x1080 console window hidden when DWM window cloaking is unavailable (as under Wine), where `DwmSetWindowAttribute(DWMWA_CLOAK)` fails or leaves `DWMWA_CLOAKED == 0` and causes the title's blank window to cover XCL's presenter window. Part of #175. **What is in it** - `crates/xcl/src/hle/user.rs`: query `DwmGetWindowAttribute(DWMWA_CLOAKED)` after `DwmSetWindowAttribute(DWMWA_CLOAK)`; if cloaking did not take effect, call `ShowWindow(hwnd, SW_HIDE)` and strip `SWP_SHOWWINDOW` in `console_wndproc` on `WM_WINDOWPOSCHANGING` so subsequent title show calls keep it hidden while keeping its 1920x1080 client rect. - `crates/xcl/src/hle/user.rs` (`tests`): add `console_window_stays_hidden_when_uncloaked`. **Tested** - NVIDIA GeForce RTX 4090 (driver 610.57.04), AMD Ryzen 9 7950X3D, Linux + Proton Experimental / vkd3d-proton (relaxed vtable check), `rustc 1.98.1` (`x86_64-pc-windows-msvc` cross-compile), debug. - `cargo test --workspace --no-fail-fast --target x86_64-pc-windows-msvc -- --test-threads=4 --skip a_freed_block_is_decommitted_before_its_address_is_reused`: 700 passed, 4 failed (pre-existing Wine-only failures: `hle::xaudio2::tests::xma2_source_voice_decodes_and_manages_lifetime`, `test_title_runs_and_game_folder_is_untouched`, `disk_free_space_ex_reports_pls_quota`, `set_predication_buffer_state_and_kickoff`), 41 ignored, 1 filtered (`a_freed_block_is_decommitted_before_its_address_is_reused`). - `SKIPPED` GPU tests: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask` (`no wave64`), `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` (`no wave64`). - New test passed: `hle::user::tests::console_window_stays_hidden_when_uncloaked` (verified `IsWindowVisible == 0` under Wine after `ShowWindow(SW_SHOW)` and `SetWindowPos(SWP_SHOWWINDOW)`). **Regression run** - Pending native Windows `scripts/smoke.ps1` runs on a retail title (Linux/Proton environment only). **Not tested** - Native Windows 10/11 DWM-cloaked branch (`cloaked != 0`), AMD RDNA, `scripts/smoke.ps1` retail regression run. **AI use** - Antigravity (Google DeepMind; exact model version not exposed to the agent) — assisted with code, test, and PR description; reviewed, built, and run on hardware by the author.
MesshM commented 2026-11-24 07:06:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T05:51:23Z.


Test run of bee31d566288a70b7c749146527577af73081c0d on AMD RDNA4. I merged it onto current main e50836b locally (clean merge).

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200 (native Windows, not Wine), Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 705 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 664 passed, 0 failed, 21 ignored
  • 0 SKIPPED; the user tests pass.

Review: Hiding the console window only when DWMWA_CLOAKED reads back 0 after DWMWA_CLOAK leaves native Windows (where cloaking works) on the existing path. Not checked under Wine.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

<!-- greyfinch-sync:ivall/xcl:comment:7123338803 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/794#issuecomment-7123338803). Originally posted by [MesshM](https://github.com/MesshM) on 2026-11-24T05:51:23Z. --- Test run of `bee31d566288a70b7c749146527577af73081c0d` on AMD RDNA4. I merged it onto current `main` `e50836b` locally (clean merge). **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200 (native Windows, not Wine), Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **705 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 664 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; the `user` tests pass. **Review:** Hiding the console window only when `DWMWA_CLOAKED` reads back 0 after `DWMWA_CLOAK` leaves native Windows (where cloaking works) on the existing path. Not checked under Wine. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Anon64 commented 2026-11-24 08:03:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-24T07:17:49Z.


Regression runs for this PR's head bee31d5 and for its base main d208e14, on a retail title (same title, 60 s each), made with scripts/smoke.ps1 (release, clean tree at each commit) and pasted unedited, for Regression run.

main:

xcl-smoke v1
commit: d208e14b765f469f4b56301b78afa8dac5378339
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1647 (PresentX 1648)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16733 MB

this PR:

xcl-smoke v1
commit: bee31d566288a70b7c749146527577af73081c0d
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1654 (PresentX 1654)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16915 MB

Tested

  • NVIDIA GeForce RTX 3060 12 GB (driver 581.80, wave32), Intel Core i9-14900KF, Windows 11 25H2 26200.9974 (native Windows), Rust 1.90.0

Not tested

  • the unit tests on this machine
  • Wine: on native Windows DWM cloaking is available, so the new path is not taken; this is a regression check only

Report written with Claude Code (Claude Opus 5.5) from runs on this machine.

<!-- greyfinch-sync:ivall/xcl:comment:7124834248 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/794#issuecomment-7124834248). Originally posted by [Anon64](https://github.com/Anon64) on 2026-11-24T07:17:49Z. --- Regression runs for this PR's head `bee31d5` and for its base `main` `d208e14`, on a retail title (same title, 60 s each), made with `scripts/smoke.ps1` (release, clean tree at each commit) and pasted unedited, for **Regression run**. main: ``` xcl-smoke v1 commit: d208e14b765f469f4b56301b78afa8dac5378339 gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1647 (PresentX 1648) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16733 MB ``` this PR: ``` xcl-smoke v1 commit: bee31d566288a70b7c749146527577af73081c0d gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1654 (PresentX 1654) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16915 MB ``` **Tested** - NVIDIA GeForce RTX 3060 12 GB (driver 581.80, wave32), Intel Core i9-14900KF, Windows 11 25H2 26200.9974 (native Windows), Rust 1.90.0 **Not tested** - the unit tests on this machine - Wine: on native Windows DWM cloaking is available, so the new path is not taken; this is a regression check only Report written with Claude Code (Claude Opus 5.5) from runs on this machine.
NicolaiVdS commented 2026-11-24 11:06:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by NicolaiVdS on 2026-11-24T11:05:46Z.


Linux (Wine) report on NVIDIA.

Tested

  • AMD Ryzen 9 9950X, NVIDIA GeForce RTX 5070 Ti (driver 620.73.04), 30 GB RAM + 7 GB swap, Arch Linux (kernel 7.3.5), GE-Proton11-5 (wine-11.0 Staging). xcl.exe cross-built in release for x86_64-pc-windows-gnu (MinGW), rustc 1.99.0.
  • Build: main 09940bb + #867 at dfe1aaa + a small local change on top of #867 (XCL's own fences go through its unwrap_fence) + #684's e56dbc3 and #794's bee31d5 cherry-picked. Not this PR's head on its own.
  • cargo test --release --target x86_64-pc-windows-gnu -p xcl --lib -- hle::xg::tests hle::user::tests, run under that Wine: 10 passed, 0 failed, 0 ignored. console_window_stays_hidden_when_uncloaked is one of them.
  • Retail title 1.0.2.1 (TitleID 7952987A): without this PR, every run logged … is the console's screen (1920x1080, no frame, cloaked) and a second, white 1920x1080 window stayed open next to XCL's. With it, every run (three) logs … (1920x1080, no frame, hidden), and the frames are presented in XCL's window as before.

Not tested: Windows; the whole workspace suite (only hle::xg / hle::user, under Wine); scripts/smoke.ps1; this PR without #684 and #867.

AI use: Claude Code (Claude Opus 5.5) read the logs and the title's call site, built the branches, ran the tests and the scripted runs, and wrote this report. The runs are on my machine, on the hardware above.

<!-- greyfinch-sync:ivall/xcl:comment:7129648968 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/794#issuecomment-7129648968). Originally posted by [NicolaiVdS](https://github.com/NicolaiVdS) on 2026-11-24T11:05:46Z. --- Linux (Wine) report on NVIDIA. **Tested** - AMD Ryzen 9 9950X, NVIDIA GeForce RTX 5070 Ti (driver 620.73.04), 30 GB RAM + 7 GB swap, Arch Linux (kernel 7.3.5), GE-Proton11-5 (wine-11.0 Staging). `xcl.exe` cross-built in release for `x86_64-pc-windows-gnu` (MinGW), rustc 1.99.0. - Build: `main` `09940bb` + #867 at `dfe1aaa` + a small local change on top of #867 (XCL's own fences go through its `unwrap_fence`) + #684's `e56dbc3` and #794's `bee31d5` cherry-picked. Not this PR's head on its own. - `cargo test --release --target x86_64-pc-windows-gnu -p xcl --lib -- hle::xg::tests hle::user::tests`, run under that Wine: 10 passed, 0 failed, 0 ignored. `console_window_stays_hidden_when_uncloaked` is one of them. - Retail title 1.0.2.1 (TitleID 7952987A): without this PR, every run logged `… is the console's screen (1920x1080, no frame, cloaked)` and a second, white 1920x1080 window stayed open next to XCL's. With it, every run (three) logs `… (1920x1080, no frame, hidden)`, and the frames are presented in XCL's window as before. **Not tested:** Windows; the whole workspace suite (only `hle::xg` / `hle::user`, under Wine); `scripts/smoke.ps1`; this PR without #684 and #867. **AI use:** Claude Code (Claude Opus 5.5) read the logs and the title's call site, built the branches, ran the tests and the scripted runs, and wrote this report. The runs are on my machine, on the hardware above.
DavidM1911 commented 2026-11-25 11:09:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T10:58:34Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7160421329 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/794#issuecomment-7160421329). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T10:58:34Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
vakaobr commented 2026-11-25 19:08:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vakaobr on 2026-11-25T18:09:19Z.


Tested bee31d5 on a Mac, together with #1462: the test title's window check passes there with it.

Tested (MacBook Pro M5 Pro, macOS 27.2.1, CrossOver 26.3.0, D3DMetal 3.0, Rust 1.100.0 x86_64-pc-windows-gnu, debug). Cherry-picked cleanly with #1462 onto the Mac branch from #258 (vakaobr/xcl mac/integration, now 5f9a58f, which also has #750 and #1698 so the title runs to the end), not onto main.

  • Without it, CrossOver's DwmSetWindowAttribute(DWMWA_CLOAK) returns S_OK and DwmGetWindowAttribute(DWMWA_CLOAKED) returns E_NOTIMPL (0x80004001; GE-Proton's S_OK with 0 in #1481 is another variant, which the hr_get < 0 || cloaked == 0 test covers too). A small program making the same window (WS_POPUP | WS_VISIBLE, WS_EX_TOOLWINDOW, 1920x1080, cloaked) gets a window macOS lists as on screen at 1920x1080 (CGWindowListCopyWindowInfo), behind or over the presenter window depending on order.
  • The test title, run with xcl run 3 times: all 50 of its checks pass and it exits with 0. The log says (1920x1080, no frame, hidden). Without this and #1462 the user32 … check fails (W: not cloaked).
  • hle::user::tests, each in its own process: 4 of 4 pass, console_window_stays_hidden_when_uncloaked among them.

Not measured: whether macOS lists the hidden window. The test title's windows live for milliseconds, too short for me to catch in the window list, so that rests on the unit test (IsWindowVisible 0 after the title shows it again).

A question rather than a finding: a hidden window is not visible to the title and cannot be the foreground window, where a cloaked one can be. A title that waits for its window to be visible or active could behave differently than on Windows. On this Mac a layered window with alpha 0 and WS_EX_TRANSPARENT stays visible to Win32 while macOS draws it at alpha 0 (CGWindowList: on screen, alpha 0), in case that ever matters. I have no title that shows a difference.

Not tested: Windows, main, a retail title.

AI use: Claude Code with Claude Opus 5.5 ran the tests and probes and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7170515683 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/794#issuecomment-7170515683). Originally posted by [vakaobr](https://github.com/vakaobr) on 2026-11-25T18:09:19Z. --- Tested `bee31d5` on a Mac, together with #1462: the test title's window check passes there with it. **Tested** (MacBook Pro M5 Pro, macOS 27.2.1, CrossOver 26.3.0, D3DMetal 3.0, Rust 1.100.0 `x86_64-pc-windows-gnu`, debug). Cherry-picked cleanly with #1462 onto the Mac branch from #258 (`vakaobr/xcl` `mac/integration`, now `5f9a58f`, which also has #750 and #1698 so the title runs to the end), not onto `main`. - Without it, CrossOver's `DwmSetWindowAttribute(DWMWA_CLOAK)` returns `S_OK` and `DwmGetWindowAttribute(DWMWA_CLOAKED)` returns `E_NOTIMPL` (`0x80004001`; GE-Proton's `S_OK` with 0 in #1481 is another variant, which the `hr_get < 0 || cloaked == 0` test covers too). A small program making the same window (`WS_POPUP | WS_VISIBLE`, `WS_EX_TOOLWINDOW`, 1920x1080, cloaked) gets a window macOS lists as on screen at 1920x1080 (`CGWindowListCopyWindowInfo`), behind or over the presenter window depending on order. - The test title, run with `xcl run` 3 times: all 50 of its checks pass and it exits with 0. The log says `(1920x1080, no frame, hidden)`. Without this and #1462 the `user32 …` check fails (`W: not cloaked`). - `hle::user::tests`, each in its own process: 4 of 4 pass, `console_window_stays_hidden_when_uncloaked` among them. **Not measured:** whether macOS lists the hidden window. The test title's windows live for milliseconds, too short for me to catch in the window list, so that rests on the unit test (`IsWindowVisible` 0 after the title shows it again). A question rather than a finding: a hidden window is not visible to the title and cannot be the foreground window, where a cloaked one can be. A title that waits for its window to be visible or active could behave differently than on Windows. On this Mac a layered window with alpha 0 and `WS_EX_TRANSPARENT` stays visible to Win32 while macOS draws it at alpha 0 (`CGWindowList`: on screen, alpha 0), in case that ever matters. I have no title that shows a difference. **Not tested:** Windows, `main`, a retail title. AI use: Claude Code with Claude Opus 5.5 ran the tests and probes and wrote this report.
github-actions[bot] commented 2026-11-29 07:44:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:44:09Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7252657692 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/794#issuecomment-7252657692). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T07:44:09Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Royalflamejlh commented 2026-11-30 02:51:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-30T02:51:22Z.


@gsucristo the PR description check is what keeps this out of the merge queue (#3041): it wants two xcl-smoke blocks under Regression run, one made on this head (bee31d56) and one on a commit of main, same title and time (scripts/smoke.ps1 -Game <folder>). Could you add them? It merges cleanly into main (1c5acde4) and its build check is green. The Linux branch in #3067 carries it: under Wine the title's own window is not cloaked and covered XCL's. It is also marked stale, so it will be closed soon without activity.

AI use: Claude Code (Claude Fable 5.2) read the check's log and wrote this.

<!-- greyfinch-sync:ivall/xcl:comment:7267375747 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/794#issuecomment-7267375747). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-11-30T02:51:22Z. --- @gsucristo the `PR description` check is what keeps this out of the merge queue (#3041): it wants two `xcl-smoke` blocks under **Regression run**, one made on this head (`bee31d56`) and one on a commit of `main`, same title and time (`scripts/smoke.ps1 -Game <folder>`). Could you add them? It merges cleanly into `main` (`1c5acde4`) and its build check is green. The Linux branch in #3067 carries it: under Wine the title's own window is not cloaked and covered XCL's. It is also marked `stale`, so it will be closed soon without activity. AI use: Claude Code (Claude Fable 5.2) read the check's log and wrote this.
Foniass commented 2026-12-01 04:08:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:08:43Z.


Triage (#1607) – head bee31d5

No other open or merged PR hides the console window when DWM cloaking does not take effect. #1462 is the test-only companion: it updates the e2e window check to accept a hidden window and relies on this PR under Wine.
Main's console_window still only calls DwmSetWindowAttribute(DWMWA_CLOAK).
No problems found in the diff. On Windows the new unit test only checks the cloaked branch, so the hide path is exercised only under Wine.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7300424663 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/794#issuecomment-7300424663). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:08:43Z. --- **Triage (#1607)** – head bee31d5 No other open or merged PR hides the console window when DWM cloaking does not take effect. #1462 is the test-only companion: it updates the e2e window check to accept a hidden window and relies on this PR under Wine. Main's `console_window` still only calls `DwmSetWindowAttribute(DWMWA_CLOAK)`. No problems found in the diff. On Windows the new unit test only checks the cloaked branch, so the hide path is exercised only under Wine. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Foniass commented 2026-12-01 06:58:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:58:16Z.


Review (head bee31d56, diff read, not a merge-check: the PR description check fails (no xcl-smoke blocks), so not built or run here yet):

  • On Windows the test proves nothing: when the window is cloaked, the else branch assert_ne!(cloaked, 0) (user.rs ~371) is always true, so it neither checks hiding nor confirms cloaking worked; it only fails without the fix under Wine. Asserting something real in the cloaked branch, or splitting the decision into a testable function, would fix that.
  • The hide decision (~173) comes from DwmGetWindowAttribute(DWMWA_CLOAKED) right after DWMWA_CLOAK, not from under_wine(), so the Windows path stays unchanged only if DWM reports the window cloaked immediately; a Windows run should confirm xcl.log says "cloaked", not "hidden".
  • If SetWindowLongPtrW fails (old == 0, ~175) the window is hidden once but nothing keeps it hidden.
  • AI use doesn't name the model.

Fine: the merge with main is clean (user.rs unchanged on main since the base), the WINDOWPOS layout is right, the original window procedure runs before SWP_SHOWWINDOW is removed, the 1920x1080 client area is kept, and #3492 depends on this under Wine. Recommendation: worth a merge-check once the smoke blocks and model name are in the description.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7303493536 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/794#issuecomment-7303493536). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:58:16Z. --- Review (head bee31d56, diff read, not a merge-check: the `PR description` check fails (no xcl-smoke blocks), so not built or run here yet): - **On Windows the test proves nothing:** when the window is cloaked, the `else` branch `assert_ne!(cloaked, 0)` (`user.rs` ~371) is always true, so it neither checks hiding nor confirms cloaking worked; it only fails without the fix under Wine. Asserting something real in the cloaked branch, or splitting the decision into a testable function, would fix that. - The hide decision (~173) comes from `DwmGetWindowAttribute(DWMWA_CLOAKED)` right after `DWMWA_CLOAK`, not from `under_wine()`, so the Windows path stays unchanged only if DWM reports the window cloaked immediately; a Windows run should confirm `xcl.log` says "cloaked", not "hidden". - If `SetWindowLongPtrW` fails (`old == 0`, ~175) the window is hidden once but nothing keeps it hidden. - AI use doesn't name the model. Fine: the merge with main is clean (`user.rs` unchanged on main since the base), the `WINDOWPOS` layout is right, the original window procedure runs before `SWP_SHOWWINDOW` is removed, the 1920x1080 client area is kept, and #3492 depends on this under Wine. Recommendation: worth a merge-check once the smoke blocks and model name are in the description. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Foniass commented 2026-12-01 17:22:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T17:22:38Z.


Test report (not a merge-check: PR description red)
base: b2b1f109d2
head: bee31d5662
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2903 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: not repeated here; my review of this same head is at https://github.com/xcl-dev/xcl/pull/794#issuecomment-7303493536, and its findings stand. This run adds what reading couldn't: whether the change merges, builds and passes the whole suite on current main.
performance: no smoke run.
assessment: merges, builds and passes the whole suite on current main (0 failed) on Windows, where its Wine-specific path doesn't run; the findings in my review stand
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5

AI-written and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7319200603 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/794#issuecomment-7319200603). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T17:22:38Z. --- Test report (not a merge-check: `PR description` red) base: b2b1f109d27e746a62ec95b04dd1f9924452e682 head: bee31d566288a70b7c749146527577af73081c0d merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2903 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none review: not repeated here; my review of this same head is at https://github.com/xcl-dev/xcl/pull/794#issuecomment-7303493536, and its findings stand. This run adds what reading couldn't: whether the change merges, builds and passes the whole suite on current main. performance: no smoke run. assessment: merges, builds and passes the whole suite on current main (0 failed) on Windows, where its Wine-specific path doesn't run; the findings in my review stand hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 AI-written and posted by Foniass without a human check of each point.
Foniass commented 2026-12-03 16:52:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-03T16:52:13Z.


merge-check
base: 16c2fd082a
head: bee31d5662
merge: clean
build: ok
tests: 3013 passed, 0 failed, 56 ignored; 28 skipped, the same as on main
review: 3 medium, 1 nit (below)
performance: 60 s smoke run: 1683 → 1668 frames (99 % of main), peak commit 18505 → 17814 MB, no device removal, no crash
title run: retail title on the RTX 5070 Ti (driver 621.14), into the world by scripted presses: 234 s there, 0 device removals, 0 crashes, 3.1 presents/s; run with XCL_SKIP_CS=95cc13288a27a96e (the NVIDIA hang at the end of loading, #3541) and NVIDIA's 2048 MB shader heap (#2590)
verdict: not yet: PR description is red; otherwise no blocking finding, the suite passes and the smoke run is clean
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5


In short: Hides the title's 1920x1080 console window when DWM cloaking does not take effect (Wine, CrossOver), and strips SWP_SHOWWINDOW so it stays hidden. The head is unchanged since my earlier review and test report, it merges cleanly, and main still only cloaks. Nothing blocks it in the code; the open points are a test that cannot fail on Windows and an unconfirmed Windows log line. The PR carries the stale label.

Medium

  1. The test cannot fail on Windows. Still open from my earlier review. In console_window_stays_hidden_when_uncloaked (user.rs ~371), when DWM cloaks the window the else branch asserts cloaked != 0, which is always true there. On Windows (CI and every merge-check) it checks neither the hiding nor that cloaking worked; it fails without the fix only under Wine. Move the decision hr_set < 0 || hr_get < 0 || cloaked == 0 into a function with a unit test, or force the hide path in the test.
  2. Not shown that Windows still takes the cloaked path. Still open from my earlier review. hide (~173) comes from reading DWMWA_CLOAKED right after setting DWMWA_CLOAK, not from under_wine(), so native Windows keeps the old path only if DWM reports the window cloaked at once. A native Windows run's xcl.log should say "cloaked", not "hidden".
  3. AI use names no model. Still open from my earlier review: "exact model version not exposed to the agent". CONTRIBUTING asks for the exact model.

Nit

  1. The window does not stay hidden if subclassing fails. Still open from my earlier review. If SetWindowLongPtrW returns 0 (~175), the window is hidden once (~183), but no window procedure strips SWP_SHOWWINDOW after that.
Checked and fine
  • Merges cleanly into current origin/main (2194 commits behind); user.rs is unchanged on main since the base
  • The WINDOWPOS layout is right; the original procedure runs before SWP_SHOWWINDOW is stripped, and the 1920x1080 client area is kept (asserted in the test)
  • The PROCS lookup copies the entry and releases the lock before calling the original procedure
  • Not a duplicate: #1462 is its e2e companion and #3492 relies on it under Wine
How this was tested
  • Merged onto main 16c2fd08, then cargo build --workspace and cargo test --workspace --no-fail-fast -- --test-threads=4.
  • The skipped GPU tests are those this card can't run (no wave64 on NVIDIA, no D3D12 debug layer, and similar).
  • scripts/smoke.ps1: 60 s of a retail title on main 16c2fd08 and on this merge; presents per 2 s at the end: 60 60 60.
  • Title run: the release build of this merge launched the retail title with XCL_RUN_SECONDS=300 and scripted A presses counted from the first frame (XCL_PRESS_BASE=frame, #3712) into the world from an existing save; time in the world is counted from the first in-world draw call to the end of the run.

Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7385583196 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/794#issuecomment-7385583196). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-03T16:52:13Z. --- merge-check base: 16c2fd082ae2e96967a2ab553bc2e1032e491f70 head: bee31d566288a70b7c749146527577af73081c0d merge: clean build: ok tests: 3013 passed, 0 failed, 56 ignored; 28 skipped, the same as on main review: 3 medium, 1 nit (below) performance: 60 s smoke run: 1683 → 1668 frames (99 % of main), peak commit 18505 → 17814 MB, no device removal, no crash title run: retail title on the RTX 5070 Ti (driver 621.14), into the world by scripted presses: 234 s there, 0 device removals, 0 crashes, 3.1 presents/s; run with `XCL_SKIP_CS=95cc13288a27a96e` (the NVIDIA hang at the end of loading, #3541) and NVIDIA's 2048 MB shader heap (#2590) verdict: not yet: `PR description` is red; otherwise no blocking finding, the suite passes and the smoke run is clean hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 --- **In short:** Hides the title's 1920x1080 console window when DWM cloaking does not take effect (Wine, CrossOver), and strips SWP_SHOWWINDOW so it stays hidden. The head is unchanged since my earlier review and test report, it merges cleanly, and main still only cloaks. Nothing blocks it in the code; the open points are a test that cannot fail on Windows and an unconfirmed Windows log line. The PR carries the stale label. #### Medium 1. **The test cannot fail on Windows.** Still open from my earlier review. In console_window_stays_hidden_when_uncloaked (user.rs ~371), when DWM cloaks the window the else branch asserts `cloaked != 0`, which is always true there. On Windows (CI and every merge-check) it checks neither the hiding nor that cloaking worked; it fails without the fix only under Wine. Move the decision `hr_set < 0 || hr_get < 0 || cloaked == 0` into a function with a unit test, or force the hide path in the test. 2. **Not shown that Windows still takes the cloaked path.** Still open from my earlier review. `hide` (~173) comes from reading DWMWA_CLOAKED right after setting DWMWA_CLOAK, not from under_wine(), so native Windows keeps the old path only if DWM reports the window cloaked at once. A native Windows run's xcl.log should say "cloaked", not "hidden". 3. **AI use names no model.** Still open from my earlier review: "exact model version not exposed to the agent". CONTRIBUTING asks for the exact model. #### Nit 4. **The window does not stay hidden if subclassing fails.** Still open from my earlier review. If SetWindowLongPtrW returns 0 (~175), the window is hidden once (~183), but no window procedure strips SWP_SHOWWINDOW after that. <details><summary>Checked and fine</summary> - Merges cleanly into current origin/main (2194 commits behind); user.rs is unchanged on main since the base - The WINDOWPOS layout is right; the original procedure runs before SWP_SHOWWINDOW is stripped, and the 1920x1080 client area is kept (asserted in the test) - The PROCS lookup copies the entry and releases the lock before calling the original procedure - Not a duplicate: #1462 is its e2e companion and #3492 relies on it under Wine </details> <details><summary>How this was tested</summary> - Merged onto main `16c2fd08`, then `cargo build --workspace` and `cargo test --workspace --no-fail-fast -- --test-threads=4`. - The skipped GPU tests are those this card can't run (no wave64 on NVIDIA, no D3D12 debug layer, and similar). - `scripts/smoke.ps1`: 60 s of a retail title on main `16c2fd08` and on this merge; presents per 2 s at the end: 60 60 60. - Title run: the release build of this merge launched the retail title with `XCL_RUN_SECONDS=300` and scripted A presses counted from the first frame (`XCL_PRESS_BASE=frame`, #3712) into the world from an existing save; time in the world is counted from the first in-world draw call to the end of the run. </details> <sub>Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.</sub>
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/794:upstream-pr/794'
git switch 'upstream-pr/794'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/794'
git switch 'upstream-pr/794'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/794'
git switch 'upstream-pr/794'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/794'
git switch 'main'
git merge --squash 'upstream-pr/794'
git switch 'main'
git merge --ff-only 'upstream-pr/794'
git switch 'main'
git merge 'upstream-pr/794'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
xcl-dev/xcl!788
No description provided.