startup: add a Linux launcher and an opt-in switch to hide the title's own window #2241

Merged
JohnConnorNPC merged 11 commits from upstream-pr/2249 into main 2026-11-25 10:57:56 +00:00
JohnConnorNPC commented 2026-11-25 07:41:30 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-25T07:41:30Z.


startup: add a Linux launcher and an opt-in switch to hide the title's own window

This PR bundles two behaviours because they are used together on Linux hosts. Each has its own checks, listed below.

1. tools/startup/run.sh: a Linux counterpart of run.ps1

Why. Until now the only launcher was run.ps1. On Linux, docs/wine.md said to set the variables by hand and start debug_launch.py with a Windows Python inside Wine. That route cannot start the shader watcher. With a cold shader cache, draws have no translated pipelines until a translation pass runs, so draws are skipped and the output stays black until the pass catches up (a run on a cold cache logged translated draws 0 and pipelines translated 0 / missing 3). -Translate fills the cache during the run, and Linux had no equivalent.

Design.

  • Options: the same switches as run.ps1, as GNU long options (--exe --data --log --seconds --render --translate --fake-user --gpu-mirror --host-cpu --startup-below-40 --trace-calls --hide-title-window ...), with --console 1 as the default.
  • Required environment: WINEPREFIX and X2W_WIN_PYTHON (a Windows python.exe). WINE or PROTON picks the Wine binary. The script does no prefix bootstrap; prefix setup stays in docs/non-windows-hosts.md.
  • Paths: --data, --log, --storage and --shader-cache accept host paths or drive paths such as G:\.
    • The debugger gets drive paths as given and host paths in their Z: spelling.
    • The script creates log and cache folders through the prefix's drive links.
    • The title id and storage size are read from the package's MicrosoftGame.config, taking the first tag in any case, as run.ps1 does.
  • Defaults, all from docs/wine.md: X2W_XMEM_SHARED_VIEWS=1, WINEDLLOVERRIDES=d3d12,d3d12core,dxgi,d3d11=n, WINEFSYNC=1, WINEDEBUG=-all, and the VKD3D cache under out/. XDG_RUNTIME_DIR is unset, and PULSE_SERVER is set only when the socket exists. Values the caller set are kept, except XDG_RUNTIME_DIR.
  • --render --translate runs gfx2hlsl.py --watch in its own process group (setsid). Only that group gets d3dcompiler_47=n; the title's process does not. An EXIT trap stops the whole group: TERM first, then KILL after 2 s.
  • Exit status: the debugger's. After a Ctrl-C, the script stops the watcher and ends by SIGINT, so a calling shell loop stops too. A TERM sent to the script alone waits for the debugger and then ends by SIGTERM.

2. X2W_HIDE_TITLE_WINDOW=1: hide the title's own window (opt-in, off by default on every host)

Why. The stand-in presents into its own output window ("Xbox2Windows ... - output"). The title's own top-level window has no paint code of its own. Under an X11 window manager it is a plain white window that can sit above the output window and cover the picture. This was seen on a live Wine run.

Design.

  • TitleWindowHider in src/startup_stubs/overlay_window.h: a 500 ms timer on the output window's thread.
  • Gate. It hides only while presents reach the output window: at least one frame shown, and the latest one shown too. When a present misses the output window, it shows the title's windows again until the next present reaches it, so the GDI status fallback has a window to draw into.
  • What it hides. Only the title's own visible, unowned windows. It skips the presenter class, owned windows and dialogs (#32770).
  • How it hides. ShowWindowAsync, so a busy title thread cannot stall the output window.
  • Foreground. When a window it is about to hide is in front, it asks for the foreground for the output window first, and logs once if that is refused.
  • Without the variable, no timer is created and behaviour is unchanged. run.sh --hide-title-window sets the variable; without --render it warns, because there is no output window then.

Tests and results (Linux host)

Command Result
python -B tools/run_checks_parallel.py <the 101 scripts of windows.yml "Run Python checks"> all 101 checks passed, exit 0
python -B tests/startup_run_sh_check.py -v (new; ctest startup_run_sh, exit 77 skip on Windows) startup run.sh: 0 failed; 29 mutants of run.sh, each detected
shellcheck tools/startup/run.sh exit 0, no findings
python -B tests/docs_links_check.py Checked 18 Markdown files and 418 links.
Cross build (clang-cl + Windows SDK): startup_overlay_window, d3d12_xs exit 0; the same warnings as the base commit, none in changed files
startup_overlay_window.exe under Wine (Proton) exit 0; prints foreground handed to the output window before the hide

startup_run_sh_check.py runs the real script under bash. A stub Wine starts the host Python, and debug_launch.py and gfx2hlsl.py are stubs. It covers:

  • exit codes 2, 0 and 7 passed through;
  • the debugger's arguments and environment, including drive-path --data/--log/--shader-cache, a one-line and a lower-case config, and the overrides only the watcher gets;
  • the DLL copies and the warnings;
  • that the watcher and its child (both ignoring SIGTERM) run during the debugger call and are gone afterwards, also after a Ctrl-C (SIGINT death) and after a TERM.

Mutants include:

  • a fixed exit, the head's status as the exit;
  • no trap, a parent-only kill, no setsid, no KILL fallback, no INT trap;
  • a watcher started without --render;
  • greedy or case-sensitive config parsing, drive paths used raw;
  • the compiler override on the game or missing on the watcher.

startup_overlay_window (extended): exits 8–21 check that:

  • the switch is on only for exactly 1 (unset, 0 and 10 are off);
  • the timer is armed only with the switch and its WM_TIMER arrives;
  • nothing is hidden before the first shown present;
  • the title's window is hidden twice and shown again after a present that was not shown;
  • the presenter, its owned window and a dialog stay visible;
  • where the host allows it, the foreground moves to the output window.

The fixture's 9 mutants were run under Wine, each restored by hash: gate always on → 8, accepts 10 → 16, no presenter exclusion → 2, no owner exclusion → 2, no dialog exclusion → 12, no SetTimer → 19, gate >= 0 → 17, no SetForegroundWindow → 21, no re-show → 18.

Title runs under Wine (local; no title data in this PR)

Two runs used the same build and flags, run.sh --render --translate ..., one with and one without --hide-title-window. Window state was sampled every 10 s with xwininfo.

  • Baseline. The title's window was mapped in every sample after start-up.
  • With the switch. The title's window was unmapped in every sample, and the log has x2w-present X2W_HIDE_TITLE_WINDOW: hid 1 title window(s). The output window stayed mapped and kept counting frames.
  • Run length. Runs ended at the title's own faults, at different times from run to run, so this PR claims nothing about run length.
  • Watcher under Wine. 20 s in, the watcher's process group held 2 Python/FXC processes. After exit, no watcher or FXC process was left.

Not measured

  • Windows CI and CTest for the extended startup_overlay_window. It is not in the pr preset, so it runs only in the main/manual CI.
  • Whether keyboard input still reaches the title after the hide. GameInput reads the keyboard only while a window of the process is in front. Under Wine the fixture's foreground handoff worked, but with the title it was not established.
  • ShowWindowAsync across threads: the fixture's windows are on its own thread.
  • The fixture's foreground-handoff case (exit 21) is a partial skip on a host that refuses SetForegroundWindow to the test: it prints foreground handoff not checked and still exits 0. It ran under Wine; on Windows CI it may be skipped this way.
  • run.sh outside this Proton Experimental setup (other Wine builds, distributions or window managers).
  • macOS: run.sh and its check need bash 4.4 or newer, GNU realpath and setsid.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6599664670 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2249). Originally posted by [JohnConnorNPC](https://github.com/JohnConnorNPC) on 2026-11-25T07:41:30Z. --- ## startup: add a Linux launcher and an opt-in switch to hide the title's own window This PR bundles two behaviours because they are used together on Linux hosts. Each has its own checks, listed below. ### 1. `tools/startup/run.sh`: a Linux counterpart of `run.ps1` **Why.** Until now the only launcher was `run.ps1`. On Linux, `docs/wine.md` said to set the variables by hand and start `debug_launch.py` with a Windows Python inside Wine. That route cannot start the shader watcher. With a cold shader cache, draws have no translated pipelines until a translation pass runs, so draws are skipped and the output stays black until the pass catches up (a run on a cold cache logged `translated draws 0` and `pipelines translated 0 / missing 3`). `-Translate` fills the cache during the run, and Linux had no equivalent. **Design.** - Options: the same switches as `run.ps1`, as GNU long options (`--exe --data --log --seconds --render --translate --fake-user --gpu-mirror --host-cpu --startup-below-40 --trace-calls --hide-title-window ...`), with `--console 1` as the default. - Required environment: `WINEPREFIX` and `X2W_WIN_PYTHON` (a Windows `python.exe`). `WINE` or `PROTON` picks the Wine binary. The script does no prefix bootstrap; prefix setup stays in `docs/non-windows-hosts.md`. - Paths: `--data`, `--log`, `--storage` and `--shader-cache` accept host paths or drive paths such as `G:\`. - The debugger gets drive paths as given and host paths in their `Z:` spelling. - The script creates log and cache folders through the prefix's drive links. - The title id and storage size are read from the package's `MicrosoftGame.config`, taking the first tag in any case, as `run.ps1` does. - Defaults, all from `docs/wine.md`: `X2W_XMEM_SHARED_VIEWS=1`, `WINEDLLOVERRIDES=d3d12,d3d12core,dxgi,d3d11=n`, `WINEFSYNC=1`, `WINEDEBUG=-all`, and the VKD3D cache under `out/`. `XDG_RUNTIME_DIR` is unset, and `PULSE_SERVER` is set only when the socket exists. Values the caller set are kept, except `XDG_RUNTIME_DIR`. - `--render --translate` runs `gfx2hlsl.py --watch` in its own process group (`setsid`). Only that group gets `d3dcompiler_47=n`; the title's process does not. An EXIT trap stops the whole group: TERM first, then KILL after 2 s. - Exit status: the debugger's. After a Ctrl-C, the script stops the watcher and ends by SIGINT, so a calling shell loop stops too. A TERM sent to the script alone waits for the debugger and then ends by SIGTERM. ### 2. `X2W_HIDE_TITLE_WINDOW=1`: hide the title's own window (opt-in, off by default on every host) **Why.** The stand-in presents into its own output window ("Xbox2Windows ... - output"). The title's own top-level window has no paint code of its own. Under an X11 window manager it is a plain white window that can sit above the output window and cover the picture. This was seen on a live Wine run. **Design.** - `TitleWindowHider` in `src/startup_stubs/overlay_window.h`: a 500 ms timer on the output window's thread. - **Gate.** It hides only while presents reach the output window: at least one frame shown, and the latest one shown too. When a present misses the output window, it shows the title's windows again until the next present reaches it, so the GDI status fallback has a window to draw into. - **What it hides.** Only the title's own visible, unowned windows. It skips the presenter class, owned windows and dialogs (`#32770`). - **How it hides.** `ShowWindowAsync`, so a busy title thread cannot stall the output window. - **Foreground.** When a window it is about to hide is in front, it asks for the foreground for the output window first, and logs once if that is refused. - Without the variable, no timer is created and behaviour is unchanged. `run.sh --hide-title-window` sets the variable; without `--render` it warns, because there is no output window then. ### Tests and results (Linux host) | Command | Result | |---|---| | `python -B tools/run_checks_parallel.py <the 101 scripts of windows.yml "Run Python checks">` | `all 101 checks passed`, exit 0 | | `python -B tests/startup_run_sh_check.py -v` (new; ctest `startup_run_sh`, exit 77 skip on Windows) | `startup run.sh: 0 failed`; 29 mutants of `run.sh`, each detected | | `shellcheck tools/startup/run.sh` | exit 0, no findings | | `python -B tests/docs_links_check.py` | `Checked 18 Markdown files and 418 links.` | | Cross build (clang-cl + Windows SDK): `startup_overlay_window`, `d3d12_xs` | exit 0; the same warnings as the base commit, none in changed files | | `startup_overlay_window.exe` under Wine (Proton) | exit 0; prints `foreground handed to the output window before the hide` | **`startup_run_sh_check.py`** runs the real script under bash. A stub Wine starts the host Python, and `debug_launch.py` and `gfx2hlsl.py` are stubs. It covers: - exit codes 2, 0 and 7 passed through; - the debugger's arguments and environment, including drive-path `--data`/`--log`/`--shader-cache`, a one-line and a lower-case config, and the overrides only the watcher gets; - the DLL copies and the warnings; - that the watcher and its child (both ignoring SIGTERM) run during the debugger call and are gone afterwards, also after a Ctrl-C (SIGINT death) and after a TERM. Mutants include: - a fixed exit, the head's status as the exit; - no trap, a parent-only kill, no `setsid`, no KILL fallback, no INT trap; - a watcher started without `--render`; - greedy or case-sensitive config parsing, drive paths used raw; - the compiler override on the game or missing on the watcher. **`startup_overlay_window`** (extended): exits 8–21 check that: - the switch is on only for exactly `1` (unset, `0` and `10` are off); - the timer is armed only with the switch and its `WM_TIMER` arrives; - nothing is hidden before the first shown present; - the title's window is hidden twice and shown again after a present that was not shown; - the presenter, its owned window and a dialog stay visible; - where the host allows it, the foreground moves to the output window. The fixture's 9 mutants were run under Wine, each restored by hash: gate always on → 8, accepts `10` → 16, no presenter exclusion → 2, no owner exclusion → 2, no dialog exclusion → 12, no `SetTimer` → 19, gate `>= 0` → 17, no `SetForegroundWindow` → 21, no re-show → 18. ### Title runs under Wine (local; no title data in this PR) Two runs used the same build and flags, `run.sh --render --translate ...`, one with and one without `--hide-title-window`. Window state was sampled every 10 s with `xwininfo`. - **Baseline.** The title's window was mapped in every sample after start-up. - **With the switch.** The title's window was unmapped in every sample, and the log has `x2w-present X2W_HIDE_TITLE_WINDOW: hid 1 title window(s)`. The output window stayed mapped and kept counting frames. - **Run length.** Runs ended at the title's own faults, at different times from run to run, so this PR claims nothing about run length. - **Watcher under Wine.** 20 s in, the watcher's process group held 2 Python/FXC processes. After exit, no watcher or FXC process was left. ### Not measured - Windows CI and CTest for the extended `startup_overlay_window`. It is not in the `pr` preset, so it runs only in the main/manual CI. - Whether keyboard input still reaches the title after the hide. `GameInput` reads the keyboard only while a window of the process is in front. Under Wine the fixture's foreground handoff worked, but with the title it was not established. - `ShowWindowAsync` across threads: the fixture's windows are on its own thread. - The fixture's foreground-handoff case (exit 21) is a partial skip on a host that refuses `SetForegroundWindow` to the test: it prints `foreground handoff not checked` and still exits 0. It ran under Wine; on Windows CI it may be skipped this way. - `run.sh` outside this Proton Experimental setup (other Wine builds, distributions or window managers). - macOS: `run.sh` and its check need bash 4.4 or newer, GNU `realpath` and `setsid`. AI-assisted.
tedin7 commented 2026-11-25 08:05:01 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T07:45:29Z.

Review: COMMENTED


Review of head d7593763fb

Verdict: no P1, no P2 found. Two nits. Not approving or merging (external review only).

Commands run locally (Linux, in a worktree of this head)

  • git diff --stat origin/main...HEAD: 12 files, +857/-12.
  • python3 -B tests/startup_run_sh_check.py -> startup run.sh: 0 failed
  • python3 tests/docs_links_check.py -> self-test passed, 18 Markdown files, 418 links
  • python3 tests/bidi_controls_check.py -> no bidirectional controls in 1507 files
  • git diff --check origin/main...HEAD -> clean
  • bash -n tools/startup/run.sh -> OK
  • Mutation 1: --hide-title-window exporting X2W_HIDE_TITLE_WINDOW=0 instead of 1 -> check fails 2 cases (killed).
  • Mutation 2: watcher kill changed from -$watcher to $watcher -> the check refuses to run (its own mutation anchor count guard fires, expected 3 found 2), so the guard is itself tested.
  • Mutations restored with git checkout -- ..
  • Not run: tests/startup_overlay_window.cpp and the presenter changes (Windows-only C++); CI "Build and test on Windows" was still pending when I looked. I did not queue the Windows VM.

Read-through

  • run.sh: option set mirrors run.ps1; required env checked up front; drive-path handling goes through dosdevices; watcher runs in its own process group with TERM then KILL on exit/INT; the exit code of the debugger is passed through. Looks right.
  • TitleWindowHider::step: hides only when presents > 0 && last_shown, restores when frames stop, uses ShowWindowAsync so the output thread keeps pumping, skips #32770 dialogs, takes the foreground first. State is touched from the output thread only; last_frame_shown and window_presents are read with interlocked ops. Looks right.
  • CMake: startup_run_sh uses SKIP_RETURN_CODE 77; workflow list updated; docs updated.

Nits

  • N1 tools/startup/run.sh (config parse): values must start on the tag's line and UTF-16 configs are not read. Already documented in the script comment; maybe also say it in docs/wine.md.
  • N2 src/startup_stubs/d3d12_present.inl (WM_TIMER handler): the static bool told_* flags are function-local statics shared across any output window. Fine today (one window), only worth a comment.

P1=0 P2=0

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6053648316 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2249#pullrequestreview-6053648316). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T07:45:29Z. **Review:** COMMENTED --- ## Review of head d7593763fbbbeebed847fedbbc5458858aba6616 Verdict: no P1, no P2 found. Two nits. Not approving or merging (external review only). ### Commands run locally (Linux, in a worktree of this head) - `git diff --stat origin/main...HEAD`: 12 files, +857/-12. - `python3 -B tests/startup_run_sh_check.py` -> `startup run.sh: 0 failed` - `python3 tests/docs_links_check.py` -> self-test passed, 18 Markdown files, 418 links - `python3 tests/bidi_controls_check.py` -> no bidirectional controls in 1507 files - `git diff --check origin/main...HEAD` -> clean - `bash -n tools/startup/run.sh` -> OK - Mutation 1: `--hide-title-window` exporting `X2W_HIDE_TITLE_WINDOW=0` instead of `1` -> check fails 2 cases (killed). - Mutation 2: watcher kill changed from `-$watcher` to `$watcher` -> the check refuses to run (its own mutation anchor count guard fires, expected 3 found 2), so the guard is itself tested. - Mutations restored with `git checkout -- .`. - Not run: `tests/startup_overlay_window.cpp` and the presenter changes (Windows-only C++); CI "Build and test on Windows" was still pending when I looked. I did not queue the Windows VM. ### Read-through - `run.sh`: option set mirrors `run.ps1`; required env checked up front; drive-path handling goes through dosdevices; watcher runs in its own process group with TERM then KILL on exit/INT; the exit code of the debugger is passed through. Looks right. - `TitleWindowHider::step`: hides only when `presents > 0 && last_shown`, restores when frames stop, uses `ShowWindowAsync` so the output thread keeps pumping, skips `#32770` dialogs, takes the foreground first. State is touched from the output thread only; `last_frame_shown` and `window_presents` are read with interlocked ops. Looks right. - CMake: `startup_run_sh` uses `SKIP_RETURN_CODE 77`; workflow list updated; docs updated. ### Nits - N1 `tools/startup/run.sh` (config parse): values must start on the tag's line and UTF-16 configs are not read. Already documented in the script comment; maybe also say it in `docs/wine.md`. - N2 `src/startup_stubs/d3d12_present.inl` (WM_TIMER handler): the `static bool told_*` flags are function-local statics shared across any output window. Fine today (one window), only worth a comment. P1=0 P2=0 AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-25 10:05:19 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T09:15:39Z.

Review: COMMENTED


Re-review of head 99d38bdef107c2e46140b7988cad9ac0f91bb6c3 (previous review covered d759376).

What changed since d759376 (git diff d759376 HEAD, 2 files, +5/-1):

  • docs/wine.md: states that title id and storage size come from MicrosoftGame.config (first tag, any case), that a value must start on its tag's line, and that UTF-16 configs are not read.
  • src/startup_stubs/d3d12_present.inl: comment only, noting the told_* flags are shared by every output window (logged once per process).

No logic change, so the behaviour I reviewed before is unchanged. The doc limits match what tools/startup/run.sh does.

Commands run locally on this head

  • python3 tests/startup_run_sh_check.py -> startup run.sh: 0 failed
  • python3 tests/docs_links_check.py -> Checked 18 Markdown files and 418 links. Self-test passed.
  • python3 tests/bidi_controls_check.py -> Checked 1507 tracked ... files: no bidirectional controls.
  • git diff --check origin/main...HEAD -> clean
  • Mutation: changed export X2W_HIDE_TITLE_WINDOW=1 to =0 in tools/startup/run.sh:138 -> FAIL stub exit 0 --hide-title-window ... expected '1', 2 failed. The test kills it. Reverted with git checkout -- ..
  • gh pr checks: "Build and test on Windows" passes. Two Linux jobs fail ("Assemble and translate gfx1013 fixtures" and "Run platform-independent Python checks on Linux") with TypeError: 'NoneType' object is not an iterator from tools/mesh_entry_aot.py / mesh_dynamic_aot.py under LLVM 15. This PR does not touch those files, so it looks unrelated (a pre-existing failure on main or a runner problem). Please re-run or confirm on main before Ready.

Findings: P1=0, P2=0.

  • nit: none new. Mergeable, title neutral, no clean-room concerns seen.

Win2025 WARP was not run by me: the new delta is docs and a comment only.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6054755288 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2249#pullrequestreview-6054755288). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T09:15:39Z. **Review:** COMMENTED --- Re-review of head `99d38bdef107c2e46140b7988cad9ac0f91bb6c3` (previous review covered `d759376`). **What changed since d759376** (`git diff d759376 HEAD`, 2 files, +5/-1): - `docs/wine.md`: states that title id and storage size come from `MicrosoftGame.config` (first tag, any case), that a value must start on its tag's line, and that UTF-16 configs are not read. - `src/startup_stubs/d3d12_present.inl`: comment only, noting the `told_*` flags are shared by every output window (logged once per process). No logic change, so the behaviour I reviewed before is unchanged. The doc limits match what `tools/startup/run.sh` does. **Commands run locally on this head** - `python3 tests/startup_run_sh_check.py` -> `startup run.sh: 0 failed` - `python3 tests/docs_links_check.py` -> `Checked 18 Markdown files and 418 links.` Self-test passed. - `python3 tests/bidi_controls_check.py` -> `Checked 1507 tracked ... files: no bidirectional controls.` - `git diff --check origin/main...HEAD` -> clean - Mutation: changed `export X2W_HIDE_TITLE_WINDOW=1` to `=0` in `tools/startup/run.sh:138` -> `FAIL stub exit 0 --hide-title-window ... expected '1'`, `2 failed`. The test kills it. Reverted with `git checkout -- .`. - `gh pr checks`: "Build and test on Windows" passes. Two Linux jobs fail ("Assemble and translate gfx1013 fixtures" and "Run platform-independent Python checks on Linux") with `TypeError: 'NoneType' object is not an iterator` from `tools/mesh_entry_aot.py` / `mesh_dynamic_aot.py` under LLVM 15. This PR does not touch those files, so it looks unrelated (a pre-existing failure on main or a runner problem). Please re-run or confirm on main before Ready. **Findings:** P1=0, P2=0. - nit: none new. Mergeable, title neutral, no clean-room concerns seen. Win2025 WARP was not run by me: the new delta is docs and a comment only. AI-assisted; commands listed were executed locally.
upstream-sync closed this pull request 2026-11-25 11:02:13 +00:00
tedin7 commented 2026-11-25 11:02:13 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T10:23:40Z.

Review: COMMENTED


Re-review of head 601d67b7bde6b41a7224a3ba26ceb05c61e76a30

Previous review covered 99d38bd.

What changed since 99d38bd: a merge of origin/main only. Compared git diff <old merge-base> 99d38bd with git diff origin/main...HEAD: the PR's own change is the same 12 files (+861/-12), and only hunk offsets and neighbouring context lines differ. No new logic in run.sh, the overlay window, the presenter, the tests or the docs.

Commands run locally on this head

  • git diff --stat origin/main...HEAD -> 12 files, +861/-12
  • python3 tests/startup_run_sh_check.py -> run 1: FAIL mutant 'watcher without --render' was not detected, 1 failed. Run 2 (same tree, nothing changed): startup run.sh: 0 failed.
  • python3 tests/docs_links_check.py -> self-test passed, 18 Markdown files, 442 links
  • python3 tests/bidi_controls_check.py -> 1581 files, no bidirectional controls
  • git diff --check origin/main...HEAD -> clean
  • bash -n tools/startup/run.sh -> OK
  • Mutation: export X2W_HIDE_TITLE_WINDOW=1 -> =0 at tools/startup/run.sh:138 -> 2 cases fail (--hide-title-window expects '1'), 2 failed. Killed. Restored with git checkout -- ..
  • gh pr checks: all pass, including "Build and test on Windows" (3m3s) and both Linux jobs (the earlier gfx1013 failures are gone). Mergeable, title neutral, no clean-room concerns.

Findings

  • P2 (flaky test) tests/startup_run_sh_check.py:383 (mutant "watcher without --render"): it was reported as not detected on one run and detected on the next, with the same tree. The machine load average was about 8 at the time. Which run fails looks timing dependent (the case at line 331 that expects no translator to start, or the watcher-running check around lines 293-306). The check fails in the PR's own required list, so a loaded CI runner could fail it at random. I did not root-cause it. Suggest waiting for the translator stand-in's start marker (or a longer bounded wait) before deciding the watcher "did not start".
  • nit: none new.

P1=0, P2=1

Win2025 WARP was not run by me: the delta since the last review is a main merge and does not touch shader or C++ logic in this PR.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6055776782 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2249#pullrequestreview-6055776782). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T10:23:40Z. **Review:** COMMENTED --- ## Re-review of head `601d67b7bde6b41a7224a3ba26ceb05c61e76a30` Previous review covered `99d38bd`. **What changed since 99d38bd:** a merge of `origin/main` only. Compared `git diff <old merge-base> 99d38bd` with `git diff origin/main...HEAD`: the PR's own change is the same 12 files (+861/-12), and only hunk offsets and neighbouring context lines differ. No new logic in `run.sh`, the overlay window, the presenter, the tests or the docs. **Commands run locally on this head** - `git diff --stat origin/main...HEAD` -> 12 files, +861/-12 - `python3 tests/startup_run_sh_check.py` -> run 1: `FAIL mutant 'watcher without --render' was not detected`, `1 failed`. Run 2 (same tree, nothing changed): `startup run.sh: 0 failed`. - `python3 tests/docs_links_check.py` -> self-test passed, 18 Markdown files, 442 links - `python3 tests/bidi_controls_check.py` -> 1581 files, no bidirectional controls - `git diff --check origin/main...HEAD` -> clean - `bash -n tools/startup/run.sh` -> OK - Mutation: `export X2W_HIDE_TITLE_WINDOW=1` -> `=0` at `tools/startup/run.sh:138` -> 2 cases fail (`--hide-title-window` expects `'1'`), `2 failed`. Killed. Restored with `git checkout -- .`. - `gh pr checks`: all pass, including "Build and test on Windows" (3m3s) and both Linux jobs (the earlier gfx1013 failures are gone). Mergeable, title neutral, no clean-room concerns. **Findings** - P2 (flaky test) `tests/startup_run_sh_check.py:383` (mutant "watcher without --render"): it was reported as not detected on one run and detected on the next, with the same tree. The machine load average was about 8 at the time. Which run fails looks timing dependent (the case at line 331 that expects no translator to start, or the watcher-running check around lines 293-306). The check fails in the PR's own required list, so a loaded CI runner could fail it at random. I did not root-cause it. Suggest waiting for the translator stand-in's start marker (or a longer bounded wait) before deciding the watcher "did not start". - nit: none new. P1=0, P2=1 Win2025 WARP was not run by me: the delta since the last review is a main merge and does not touch shader or C++ logic in this PR. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-25 11:02:13 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T10:39:27Z.

Review: COMMENTED


Re-review of head ea1c25249105a30403f2778172707644fce19059

Previous review covered 601d67b.

What changed since 601d67b: one commit, tests/startup_overlay_window.cpp only (+17/-4). The Win32 overlay fixture now waits (bounded 3 s, pumping the thread's messages) for the posted show/hide to take effect before checking IsWindowVisible. This is a sound fix for the async ShowWindowAsync race. tests/startup_run_sh_check.py and tools/startup/run.sh are unchanged.

Commands run locally on this head

  • git diff 601d67b HEAD --stat -> 1 file, +17/-4
  • python3 tests/startup_run_sh_check.py x5 (same tree, load average about 8): 4 runs startup run.sh: 0 failed, 1 run FAIL mutant 'watcher without --render' was not detected / 1 failed
  • python3 tests/docs_links_check.py -> self-test passed, 18 Markdown files, 442 links
  • python3 tests/bidi_controls_check.py -> 1581 files, no bidirectional controls
  • git diff --check origin/main...HEAD -> clean
  • gh pr checks: all pass, including "Build and test on Windows" and both Linux jobs. Mergeable, title neutral, no clean-room concerns.
  • Mutation: not repeated; the delta is test-only and the earlier X2W_HIDE_TITLE_WINDOW=1 -> 0 mutation was already killed on the prior head.

Findings

  • P2 (still open, flaky test) tests/startup_run_sh_check.py:383: the mutant "watcher without --render" is intermittently reported as not detected (1 of 5 runs here, same tree). It is the same failure as on the previous head, so the earlier P2 is not resolved. This commit fixes the Win32 fixture race, which is a different test. Likely cause: the check decides the watcher "did not start" after a short fixed wait, so under load the mutant's watcher has not started yet. Suggest waiting for the translator stand-in's start marker, or a longer bounded wait, before deciding.
  • nit: none new.

P1=0, P2=1

Win2025 WARP was not run by me: the delta is a Win32 fixture wait in a test, with no shader or lowering logic. The repo's own Windows CI job passes.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6056019343 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2249#pullrequestreview-6056019343). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T10:39:27Z. **Review:** COMMENTED --- ## Re-review of head `ea1c25249105a30403f2778172707644fce19059` Previous review covered `601d67b`. **What changed since 601d67b:** one commit, `tests/startup_overlay_window.cpp` only (+17/-4). The Win32 overlay fixture now waits (bounded 3 s, pumping the thread's messages) for the posted show/hide to take effect before checking `IsWindowVisible`. This is a sound fix for the async `ShowWindowAsync` race. `tests/startup_run_sh_check.py` and `tools/startup/run.sh` are unchanged. **Commands run locally on this head** - `git diff 601d67b HEAD --stat` -> 1 file, +17/-4 - `python3 tests/startup_run_sh_check.py` x5 (same tree, load average about 8): 4 runs `startup run.sh: 0 failed`, 1 run `FAIL mutant 'watcher without --render' was not detected` / `1 failed` - `python3 tests/docs_links_check.py` -> self-test passed, 18 Markdown files, 442 links - `python3 tests/bidi_controls_check.py` -> 1581 files, no bidirectional controls - `git diff --check origin/main...HEAD` -> clean - `gh pr checks`: all pass, including "Build and test on Windows" and both Linux jobs. Mergeable, title neutral, no clean-room concerns. - Mutation: not repeated; the delta is test-only and the earlier `X2W_HIDE_TITLE_WINDOW=1 -> 0` mutation was already killed on the prior head. **Findings** - P2 (still open, flaky test) `tests/startup_run_sh_check.py:383`: the mutant "watcher without --render" is intermittently reported as not detected (1 of 5 runs here, same tree). It is the same failure as on the previous head, so the earlier P2 is not resolved. This commit fixes the Win32 fixture race, which is a different test. Likely cause: the check decides the watcher "did not start" after a short fixed wait, so under load the mutant's watcher has not started yet. Suggest waiting for the translator stand-in's start marker, or a longer bounded wait, before deciding. - nit: none new. P1=0, P2=1 Win2025 WARP was not run by me: the delta is a Win32 fixture wait in a test, with no shader or lowering logic. The repo's own Windows CI job passes. AI-assisted; commands listed were executed locally.
R0Y00 commented 2026-11-25 11:02:30 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T10:26:08Z.


The source-built launcher suite passed in Ubuntu 22.04 under WSL. I also rebuilt the overlay fixture on native Windows. It consistently exited at check 12 because it read visibility before the ShowWindowAsync request was dispatched. I pushed ea1c2524 so the test pumps the owning thread's queue before asserting hide and re-show. ctest --preset release --no-tests=error -R '^startup_overlay_window$' -V now passes. This host declined SetForegroundWindow to the test, so the foreground handoff remains covered by your Proton result.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7159690610 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2249#issuecomment-7159690610). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T10:26:08Z. --- The source-built launcher suite passed in Ubuntu 22.04 under WSL. I also rebuilt the overlay fixture on native Windows. It consistently exited at check 12 because it read visibility before the `ShowWindowAsync` request was dispatched. I pushed `ea1c2524` so the test pumps the owning thread's queue before asserting hide and re-show. `ctest --preset release --no-tests=error -R '^startup_overlay_window$' -V` now passes. This host declined `SetForegroundWindow` to the test, so the foreground handoff remains covered by your Proton result.
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
R0Y00/Xbox2Windows!2241
No description provided.