WebPanel: fix round 2 (unresponsive reset, foreground gate, clipboard, Open rollback)

- Reset the unresponsive counter on teardown, on each new open and on
  navigation completed; harness check UnresponsiveCountResetsPerOpen.
- Show only calls SetForegroundWindow when our process holds the foreground.
- ClipboardRead permission is denied for about:blank.
- Open rolls back live handle and status fields if the STA thread fails to start.
- State struct minimum size is 28 on both platforms; test asserts it unguarded.
- Harness Escape message reports game key count as informational.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daniel Wallace 2026-11-07 15:38:19 -08:00
commit ba7d96c7d9
5 changed files with 54 additions and 5 deletions

View file

@ -204,7 +204,7 @@ internal static unsafe class Program
Eq(WebPanelApiRules.CallRefusal(true), (int)WebPanelCode.ShuttingDown, "calls refused after shutdown");
uint min = WebPanelApiRules.StateMinSize;
if (IntPtr.Size == 4) Eq(min, 28u, "OffsetOf(Reserved) of the state struct on x86");
Eq(min, 28u, "OffsetOf(Reserved) of the state struct (no pointer fields: 28 on x86 and x64)");
Check(min > 0 && min < (uint)sizeof(WebPanelStateNative), "min size is inside the struct");
Check(!WebPanelApiRules.StateArgsOk(null), "null state refused");
WebPanelStateNative st = default;