e2e: the console screen may be hidden where DWM cannot cloak it #1452

Open
crastinator wants to merge 1 commit from upstream-pr/1462 into main
crastinator commented 2026-11-24 16:27:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by crastinator on 2026-11-24T16:27:38Z.


The e2e test title's window check required DWMWA_CLOAKED != 0. Under Wine, DwmGetWindowAttribute(DWMWA_CLOAKED) returns S_OK with cloaked 0, since there is no DWM cloaking, so the check fails on every Linux and macOS run (W: not cloaked). #794 makes XCL hide the window in that case. This updates the check to match, and also tests the second half of #794: a title showing the window again must not bring it back. Part of #175; a test-only companion to #794.

It is based on main, not stacked on #794, so it stays test-only. Under Wine the check passes only once #794 is merged. On Windows the window is cloaked, so it passes as before.

What is in it

  • tests/testtitle/src/main.rs, the user32 window check:
    • a window must be cloaked, or (where DWM reports it uncloaked, as #794 decides) not visible;
    • after ShowWindow(SW_SHOW) and SetWindowPos(SWP_SHOWWINDOW | SWP_NOACTIVATE) it must still be cloaked or hidden;
    • both windows and the class are destroyed and unregistered on every path, and a failed cleanup is reported;
    • the messages include the HRESULT and the cloaked value.

Tested

  • AMD Radeon RX 6700 XT (RDNA2, gfx1031, RADV NAVI22, Mesa 26.3.1), Ryzen 7 5700X, Linux 7.3.5. Proton Experimental 11.0-20261112's Wine, vkd3d-proton v3.1 + #257's patch (-Db_ndebug=true, dxil-spirv 53aac418 from #775), DXVK v3.1.1-209 dxgi, DXC 1.9.2609.5, libopus 1.5.2. Cross-built for x86_64-pc-windows-msvc (clang-cl / lld-link, xwin SDK 10.0.26100), Rust 1.99.1, debug. The test binaries ran under Wine.
  • The window check (cargo test -p xcl --test e2e):
    tree result
    this PR + #794 (bee31d5) merged [PASS], 3/3
    this PR alone (main) [FAIL] W: neither cloaked nor hidden (DwmGetWindowAttribute 0x0, cloaked 0)
    main before this PR, with #794 [FAIL] W: not cloaked
    this PR + #794 with its pos.flags &= !SWP_SHOWWINDOW removed (local control) [FAIL] W: shown after ShowWindow / SetWindowPos(SWP_SHOWWINDOW)
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 735 passed, 16 failed, 41 ignored, 0 SKIPPED (XCL_REQUIRE_GPU=wave64,mesh). These are the same failures as on main under Wine: #530 ×2, #676, #890 ×2 (+ e2e), pls_quota #810, predication_e2e #1272, #1246 and its 7-test parallel cascade (#1246).
  • Per test, with --test-threads=1: no test fails that passes on main 930e8b4.
  • With #794 and #890 also merged, all 50 of the e2e test title's checks pass under Wine ([PASS] ×50, no [FAIL]). The e2e test then stops at report.called_stubs: [] (e2e.rs:164). That's a separate Wine issue, filed as #1461.

Regression run

  • Not needed: test-only (tests/testtitle).

Not tested

  • Windows myself. @futurepro62 ran the whole suite at 813615c on Windows 11, on an RTX 5070 Ti and on a Ryzen 9800X3D's RDNA2 iGPU: 751 passed, 0 failed, 41 ignored on both, so the cloaked branch and the show step pass on a real DWM (comment).
  • macOS / CrossOver.
  • Anything that needs game files: no XCL_SAMPLE_* set.

AI use

  • Claude Code (Claude Opus 5.5) wrote the change, ran the tests and wrote this description. It went through 4 rounds of code review and the findings were fixed. I read and checked the diff.
<!-- greyfinch-sync:ivall/xcl:issue:5476162829 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1462). Originally posted by [crastinator](https://github.com/crastinator) on 2026-11-24T16:27:38Z. --- The e2e test title's window check required `DWMWA_CLOAKED != 0`. Under Wine, `DwmGetWindowAttribute(DWMWA_CLOAKED)` returns S_OK with `cloaked 0`, since there is no DWM cloaking, so the check fails on every Linux and macOS run (`W: not cloaked`). #794 makes XCL hide the window in that case. This updates the check to match, and also tests the second half of #794: a title showing the window again must not bring it back. Part of #175; a test-only companion to #794. It is based on `main`, not stacked on #794, so it stays test-only. Under Wine the check passes only once #794 is merged. On Windows the window is cloaked, so it passes as before. **What is in it** - `tests/testtitle/src/main.rs`, the user32 window check: - a window must be cloaked, or (where DWM reports it uncloaked, as #794 decides) not visible; - after `ShowWindow(SW_SHOW)` and `SetWindowPos(SWP_SHOWWINDOW | SWP_NOACTIVATE)` it must still be cloaked or hidden; - both windows and the class are destroyed and unregistered on every path, and a failed cleanup is reported; - the messages include the HRESULT and the `cloaked` value. **Tested** - AMD Radeon RX 6700 XT (RDNA2, gfx1031, RADV NAVI22, Mesa 26.3.1), Ryzen 7 5700X, Linux 7.3.5. Proton Experimental 11.0-20261112's Wine, vkd3d-proton v3.1 + #257's patch (`-Db_ndebug=true`, dxil-spirv `53aac418` from #775), DXVK v3.1.1-209 `dxgi`, DXC 1.9.2609.5, libopus 1.5.2. Cross-built for `x86_64-pc-windows-msvc` (clang-cl / lld-link, xwin SDK 10.0.26100), Rust 1.99.1, debug. The test binaries ran under Wine. - The window check (`cargo test -p xcl --test e2e`): | tree | result | |---|---| | this PR + #794 (`bee31d5`) merged | `[PASS]`, 3/3 | | this PR alone (`main`) | `[FAIL] W: neither cloaked nor hidden (DwmGetWindowAttribute 0x0, cloaked 0)` | | `main` before this PR, with #794 | `[FAIL] W: not cloaked` | | this PR + #794 with its `pos.flags &= !SWP_SHOWWINDOW` removed (local control) | `[FAIL] W: shown after ShowWindow / SetWindowPos(SWP_SHOWWINDOW)` | - `cargo test --workspace --no-fail-fast -- --test-threads=4`: **735 passed, 16 failed, 41 ignored**, 0 SKIPPED (`XCL_REQUIRE_GPU=wave64,mesh`). These are the same failures as on `main` under Wine: #530 ×2, #676, #890 ×2 (+ e2e), `pls_quota` #810, `predication_e2e` #1272, #1246 and its 7-test parallel cascade (#1246). - Per test, with `--test-threads=1`: no test fails that passes on `main` `930e8b4`. - With #794 and #890 also merged, all 50 of the e2e test title's checks pass under Wine (`[PASS]` ×50, no `[FAIL]`). The e2e test then stops at `report.called_stubs: []` (`e2e.rs:164`). That's a separate Wine issue, filed as #1461. **Regression run** - Not needed: test-only (`tests/testtitle`). **Not tested** - Windows myself. @futurepro62 ran the whole suite at `813615c` on Windows 11, on an RTX 5070 Ti and on a Ryzen 9800X3D's RDNA2 iGPU: 751 passed, 0 failed, 41 ignored on both, so the cloaked branch and the show step pass on a real DWM ([comment](https://github.com/xcl-dev/xcl/pull/1462#issuecomment-7138441090)). - macOS / CrossOver. - Anything that needs game files: no `XCL_SAMPLE_*` set. **AI use** - Claude Code (Claude Opus 5.5) wrote the change, ran the tests and wrote this description. It went through 4 rounds of code review and the findings were fixed. I read and checked the diff.
futurepro62 commented 2026-11-24 17:06:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T16:56:25Z.


Full-suite run, since this PR has no test report yet. Tested exact head 813615c (on its base 930e8b4).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 751 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • No new #[test] functions in the diff.
  • Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 751 passed, 0 failed, 41 ignored, no skips.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7138441090 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1462#issuecomment-7138441090). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T16:56:25Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `813615c` (on its base `930e8b4`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **751 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - No new `#[test]` functions in the diff. - Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **751 passed, 0 failed, 41 ignored**, no skips. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
DavidM1911 commented 2026-11-24 19:07:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:52:57Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7141283953 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1462#issuecomment-7141283953). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T18:52:57Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
vakaobr commented 2026-11-25 18:09:20 +00:00 (Migrated from github.com)

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


Tested 813615c on a Mac, with #794: the window check passes there.

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 with #794 onto the Mac branch from #258 (vakaobr/xcl mac/integration, now 5f9a58f), not onto main.

  • The test title, run with xcl run 3 times: all 50 checks pass and it exits with 0, the user32 … check included. Without the two it fails W: not cloaked.
  • Under CrossOver, DwmGetWindowAttribute(DWMWA_CLOAKED) returns E_NOTIMPL (0x80004001) rather than the S_OK with 0 in the description and commit message. The check already covers that ((hr >= 0 && cloaked != 0) || IsWindowVisible(h) == 0), so only the wording differs.

Not tested: Windows, main without #794.

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

Update 11-29: on CrossOver 26.3, DwmGetWindowAttribute(DWMWA_CLOAKED) returns E_NOTIMPL (0x80004001), not S_OK with cloaked 0 as the description says for Wine; this PR's check handles both (hr >= 0 && cloaked != 0 or not visible). Without #794, main + this PR still fails there, as expected: W: neither cloaked nor hidden (DwmGetWindowAttribute 0x80004001, cloaked 0).

<!-- greyfinch-sync:ivall/xcl:comment:7170516063 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1462#issuecomment-7170516063). Originally posted by [vakaobr](https://github.com/vakaobr) on 2026-11-25T18:09:20Z. --- Tested `813615c` on a Mac, with #794: the window check passes there. **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 with #794 onto the Mac branch from #258 (`vakaobr/xcl` `mac/integration`, now `5f9a58f`), not onto `main`. - The test title, run with `xcl run` 3 times: all 50 checks pass and it exits with 0, the `user32 …` check included. Without the two it fails `W: not cloaked`. - Under CrossOver, `DwmGetWindowAttribute(DWMWA_CLOAKED)` returns `E_NOTIMPL` (`0x80004001`) rather than the `S_OK` with 0 in the description and commit message. The check already covers that (`(hr >= 0 && cloaked != 0) || IsWindowVisible(h) == 0`), so only the wording differs. **Not tested:** Windows, `main` without #794. AI use: Claude Code with Claude Opus 5.5 ran the tests and wrote this report. **Update 11-29:** on CrossOver 26.3, `DwmGetWindowAttribute(DWMWA_CLOAKED)` returns `E_NOTIMPL` (`0x80004001`), not S_OK with `cloaked 0` as the description says for Wine; this PR's check handles both (`hr >= 0 && cloaked != 0` or not visible). Without #794, `main` + this PR still fails there, as expected: `W: neither cloaked nor hidden (DwmGetWindowAttribute 0x80004001, cloaked 0)`.
github-actions[bot] commented 2026-11-29 07:44:11 +00:00 (Migrated from github.com)

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


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:7252658078 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1462#issuecomment-7252658078). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T07:44:11Z. --- 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.
crastinator commented 2026-11-29 09:11:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by crastinator on 2026-11-29T09:11:56Z.


Still waiting for a maintainer. It still fixes the test title's window check, which fails W: not cloaked on every Wine and CrossOver run (once #794 is in). It merges cleanly with main.

#1481 changes the same check. The differences:

  • #1481 requires S_OK from the cloak query. Under CrossOver it returns E_NOTIMPL (vakaobr's run above), so that host would still fail. This PR accepts it.
  • #1481 accepts an uncloaked window on any Wine host. This PR requires the window to be hidden there (what #794 does) and also checks that showing it again keeps it hidden.

If maintainers prefer #1481, I'm happy to close this one.

<!-- greyfinch-sync:ivall/xcl:comment:7253602463 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1462#issuecomment-7253602463). Originally posted by [crastinator](https://github.com/crastinator) on 2026-11-29T09:11:56Z. --- Still waiting for a maintainer. It still fixes the test title's window check, which fails `W: not cloaked` on every Wine and CrossOver run (once #794 is in). It merges cleanly with `main`. #1481 changes the same check. The differences: - #1481 requires `S_OK` from the cloak query. Under CrossOver it returns `E_NOTIMPL` (vakaobr's run above), so that host would still fail. This PR accepts it. - #1481 accepts an uncloaked window on any Wine host. This PR requires the window to be hidden there (what #794 does) and also checks that showing it again keeps it hidden. If maintainers prefer #1481, I'm happy to close this one.
Foniass commented 2026-12-01 05:50:38 +00:00 (Migrated from github.com)

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


Triage (#1607) – head 813615c

Test-only companion to #794 (which hides the window in user.rs where DWM cannot cloak it); not stacked on it and not a duplicate. The other PRs on #175 (#494, #669, #793, #3492) do not touch this check, and main's window check still requires cloaked != 0 only. No problems found in the diff.
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:7302197530 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1462#issuecomment-7302197530). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:50:38Z. --- **Triage (#1607)** – head 813615c Test-only companion to #794 (which hides the window in `user.rs` where DWM cannot cloak it); not stacked on it and not a duplicate. The other PRs on #175 (#494, #669, #793, #3492) do not touch this check, and main's window check still requires `cloaked != 0` only. No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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/1462:upstream-pr/1462'
git switch 'upstream-pr/1462'

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/1462'
git switch 'upstream-pr/1462'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1462'
git switch 'upstream-pr/1462'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1462'
git switch 'main'
git merge --squash 'upstream-pr/1462'
git switch 'main'
git merge --ff-only 'upstream-pr/1462'
git switch 'main'
git merge 'upstream-pr/1462'
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!1452
No description provided.