user: implement RegisterClassExW for Unicode window classes #1122
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1131"
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?
Imported from ivall/xcl. Originally posted by Ivankiosan on 2026-11-24T12:13:13Z.
The console's minuserx.dll / ext-ms-win-rtcore-ntuser-window-* family implements window creation and class registration for console titles. XCL exports CreateWindowExA, RegisterClassExA and CreateWindowExW in crates/xcl/src/hle/user.rs (exports()).
While CreateWindowExW was exported to support titles creating Unicode windows directly, RegisterClassExW was previously missing from user.rs exports. Titles registering window classes via the Unicode API set would otherwise drop to fallback stubs or fail class lookup.
What is in it
egister_class_ex_w: verifies cb_size against std::mem::size_of::<WndClassEx>(), sets ERROR_INVALID_PARAMETER on mismatch, and forwards directly to native RegisterClassExW without string conversion.
egister_class_ex_w_accepts_valid_class_and_rejects_invalid_size covering size rejection, parameter validation, and class registration/retrieval verification.
Tested
Regression run
main:
xcl-smoke v1 commit: 64b3f35599bb7102f55d640e1a791e7d6dd3b175 gpu: AMD Radeon RX 7600 title: 419239bf seconds: 10 exit: 0x0 frames shown: 1 (PresentX 1) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 7754 MBPR head:
xcl-smoke v1 commit: e50170cd52f3287b821a666207ac1d88ce0bba2b gpu: AMD Radeon RX 7600 title: 419239bf seconds: 10 exit: 0x0 frames shown: 1 (PresentX 1) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 7792 MBNot tested
AI use
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T14:25:24Z.
Full-suite run, since this PR has no test report yet. Tested exact head
e50170c(on its base47efa2e).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 742 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.register_class_ex_w_accepts_valid_class_and_rejects_invalid_size.Not tested
AI use
Imported from ivall/xcl. Originally posted by JoaoPauluu on 2026-11-24T14:34:55Z.
A run on Linux under Wine.
Tested
x86_64-pc-windows-gnu.e50170cas it is (based on47efa2e), no uncommitted changes. The lib test binary runs under Wine, one test per process (--exact).RegisterClassExWis Wine's user32 here.hle::user::tests::register_class_ex_w_accepts_valid_class_and_rejects_invalid_size: ok, no SKIPPED.Not tested
AI use
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-25T03:32:47Z.
Tested
e50170cd52f3287b821a666207ac1d88ce0bba2bon Windows 11 build 26200, Ryzen 9 5980HX, Rust 1.99.0 MSVC. This Win32 class registration suite did not exercise the RX 6800M GPU.cargo test --locked -p xcl --lib -j 2 hle::user:: -- --test-threads=1 --show-output: 4 passed, 0 failed, 0 ignored, no explicit skips. The new Unicode class test passed its invalid-size check and native registration/retrieval path.cargo build --locked --workspace -j 2: passed.Not tested
AI use
OpenAI Codex (GPT-6, exact variant not exposed in this session) reviewed the exact diff, ran the focused suite and workspace build, checked the logs, and drafted this report.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T08:02:19Z.
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!
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:40:22Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:53:17Z.
Triage (#1607) – head
e50170cThe change has no effect. Imports that
hle/user.rsdoes not export fall back to Windows' user32 (HleModule::new(MINUSERX, ..., &["user32.dll"]); the resolver testconsole_user32_and_legacy_dlls_reach_the_pc_functionsshows it for the ntuser API set), so titles already get user32'sRegisterClassExW, not a stub.register_class_ex_wrepeats thecbSizecheck that user32'sRegisterClassExWalready makes (the existingregister_class_rejects_invalid_sizes_like_windowstest relies on that) and then calls the same function.Recommendation: close (bad: pass-through wrapper, no behaviour change).
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.