Skip to content

fix/browser keys proxy - #1566

Merged
i2cjak merged 7 commits into
mainfrom
fix/browser-keys-proxy
Nov 21, 2026
Merged

i2cjak merged 7 commits into
mainfrom
fix/browser-keys-proxy

Conversation

@i2cjak

@i2cjak i2cjak commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Browser keyboard focus on Linux

Keep the composer keyboard on GPUI's proxy while a Browser page or KiCad pane is visible. Record the X11 button press on the page before replaying it to Chromium, so a real click retains the keyboard when CEF reports focus asynchronously. The Browser returns focus only while its own container still holds it. The X server serializes focus ownership checks and updates.

The watcher retries redirects when the cap's rest ends, with a logged pane fallback if the watcher dies. KiCad dialog recovery respects focus already in Backplane.

Review and verification

  • Claude Opus reviewed the original implementation. Grok independently reviewed and cleared the revised keyboard-ownership paths. The KiCad lead approved the shared native-child and pane changes.
  • i3, openbox and xfwm4 passed both pointer-key cases with 20/20 click-and-type races in each. All three passed the 21 sequence checks. The maximum measured proxy gap was 0.4 ms.
  • Browser rows passed with and without a KiCad pane. Follow-pane passed all 32 checks, including P9 and P10.
  • The sequence tests cover the visible Browser with a hidden pane, switching between Browser and pane, and a separate popped-out KiCad window. Native Wayland entry and touch emulation were reviewed at the X protocol level.

i2cjak and others added 7 commits November 21, 2026 02:19
…I2 raw press inside the page's container, taken once within 400 ms), also when CEF reports only on_got_focus

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… too (one focus watcher thread for every native child; the Browser gives the keyboard back to the proxy); sequence e2e S1-S3 and focus_trace gap

A window with only the Browser left Backplane's keyboard on the top-level itself, and core X gave every key typed with the pointer over the
page to Chromium (B2/B4). The page now registers as a native child (native_child adopt_child / note_pane_on_screen with its container), its
focus_host goes to the proxy (focus_home), and the FocusIn redirect runs on a thread and connection of its own (x11-focus-proxy) for every
top-level with a proxy, not on the pane's wake thread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@i2cjak
i2cjak merged commit 12b5b6c into main Nov 21, 2026
15 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant