Initialize COM for application-owned Wine accessibility objects

This commit is contained in:
Storm Dragon committed 2026-10-10 12:41:45 -04:00
1 parent 25e38907d3
commit 6976c83294
4 files changed
+84 -3

No files matched your search

+4 -2
View File
@@ -65,7 +65,7 @@ with tempfile.TemporaryDirectory(prefix="wine-access-menus-") as temporary:
subprocess.run([compiler, "-Wall", "-Wextra", "-mwindows",
*(["-DWINE_ACCESS_WINFORMS_FIXTURE"] if args.fixture == "winforms" else []),
"-o", str(fixture), str(Path(__file__).with_name(sourceName + "_fixture.c")),
"-luser32", "-lcomctl32"], check=True)
"-luser32", "-lcomctl32", "-loleacc", "-lole32"], check=True)
helper = None
app = None
try:
@@ -190,11 +190,13 @@ with tempfile.TemporaryDirectory(prefix="wine-access-menus-") as temporary:
assert len(saved) == 2, f"duplicate suppression/menu reset failed: {len(saved)}"
assert all(e[4] == "Ctrl+P" and e[6] == "checked, unavailable" for e in saved)
assert any(e[2] == "Return to control" and e[3] == "button" for e in events), "control focus missing"
assert any(e[2] == "Application-owned accessibility" and e[3] == "client"
for e in events), "marshaled application MSAA object unavailable"
subprocess.run([str(build / "cthulhu-wine-access.exe"),
"--no-dialog-reader", "--no-controller"],
env=env, check=True, timeout=5)
print("PASS: native and nested menus, context menus, shortcuts, states, "
"duplicate suppression, reopening, control focus, and disable options")
"duplicate suppression, reopening, marshaled MSAA, control focus, and disable options")
finally:
# Only this test's newly created Wine prefix is affected.
subprocess.run(["wineserver", "-k"], env=env, timeout=10, check=False)