user: hide title console window when DWM cloaking is unavailable (#175) #794
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!794
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-794"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@gsucristo on GitHub · 2026-11-24 05:33 UTC · original
gsucristo:user/wine-hide-console-window→main· +92 −9 · 1 files · 1 commits · openKeep the title's 1920x1080 console window hidden when DWM window cloaking is unavailable (as under Wine), where
DwmSetWindowAttribute(DWMWA_CLOAK)fails or leavesDWMWA_CLOAKED == 0and 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: queryDwmGetWindowAttribute(DWMWA_CLOAKED)afterDwmSetWindowAttribute(DWMWA_CLOAK); if cloaking did not take effect, callShowWindow(hwnd, SW_HIDE)and stripSWP_SHOWWINDOWinconsole_wndproconWM_WINDOWPOSCHANGINGso subsequent title show calls keep it hidden while keeping its 1920x1080 client rect.crates/xcl/src/hle/user.rs(tests): addconsole_window_stays_hidden_when_uncloaked.Tested
rustc 1.98.1(x86_64-pc-windows-msvccross-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).SKIPPEDGPU 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).hle::user::tests::console_window_stays_hidden_when_uncloaked(verifiedIsWindowVisible == 0under Wine afterShowWindow(SW_SHOW)andSetWindowPos(SWP_SHOWWINDOW)).Regression run
scripts/smoke.ps1runs on a retail title (Linux/Proton environment only).Not tested
cloaked != 0), AMD RDNA,scripts/smoke.ps1retail regression run.AI use
@MesshM on GitHub · 2026-11-24 05:51 UTC · original
Test run of
bee31d566288a70b7c749146527577af73081c0don AMD RDNA4. I merged it onto currentmaine50836blocally (clean merge).Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 705 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 664 passed, 0 failed, 21 ignoredSKIPPED; theusertests pass.Review: Hiding the console window only when
DWMWA_CLOAKEDreads back 0 afterDWMWA_CLOAKleaves 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 ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175@Anon64 on GitHub · 2026-11-24 07:17 UTC · original
Regression runs for this PR's head
bee31d5and for its basemaind208e14, on a retail title (same title, 60 s each), made withscripts/smoke.ps1(release, clean tree at each commit) and pasted unedited, for Regression run.main:
this PR:
Tested
Not tested
Report written with Claude Code (Claude Opus 5.5) from runs on this machine.
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175@NicolaiVdS on GitHub · 2026-11-24 11:05 UTC · original
Linux (Wine) report on NVIDIA.
Tested
xcl.execross-built in release forx86_64-pc-windows-gnu(MinGW), rustc 1.99.0.main09940bb+ #867 atdfe1aaa+ a small local change on top of #867 (XCL's own fences go through itsunwrap_fence) + #684'se56dbc3and #794'sbee31d5cherry-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_uncloakedis one of them.… 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 on GitHub · 2026-11-25 10:58 UTC · original
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 on GitHub · 2026-11-25 18:09 UTC · original
Tested
bee31d5on 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/xclmac/integration, now5f9a58f, which also has #750 and #1698 so the title runs to the end), not ontomain.DwmSetWindowAttribute(DWMWA_CLOAK)returnsS_OKandDwmGetWindowAttribute(DWMWA_CLOAKED)returnsE_NOTIMPL(0x80004001; GE-Proton'sS_OKwith 0 in #1481 is another variant, which thehr_get < 0 || cloaked == 0test 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.xcl run3 times: all 50 of its checks pass and it exits with 0. The log says(1920x1080, no frame, hidden). Without this and #1462 theuser32 …check fails (W: not cloaked).hle::user::tests, each in its own process: 4 of 4 pass,console_window_stays_hidden_when_uncloakedamong 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 (
IsWindowVisible0 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_TRANSPARENTstays 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.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.