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

@ -18,7 +18,7 @@ internal static unsafe class WebPanelApiRules
/// <summary>Navigate, Close and GetState: 0 to go on, else ShuttingDown.</summary>
public static int CallRefusal(bool shuttingDown) => shuttingDown ? (int)WebPanelCode.ShuttingDown : 0;
/// <summary>OffsetOf(Reserved): the smallest Size a caller's WebPanelStateNative may declare (32 on x86).</summary>
/// <summary>OffsetOf(Reserved): the smallest Size a caller's WebPanelStateNative may declare (28 on x86 and x64: the struct has no pointer fields).</summary>
public static uint StateMinSize
{
get