webview: render GPUI overlays above native WebView - #2626
Open
huacnlee wants to merge 14 commits into
Open
Conversation
Enable the layered GPUI scene on macOS, move root overlays into the deferred plane, expand the WebView example, and document the platform composition architecture. Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Keep WebView focus ownership in gpui-wry so GPUI only needs the scene overlay changes. Document the responder-chain requirements for clipboard shortcuts. Co-authored-by: Codex <codex@openai.com>
Build Windows WebViews with the wry composition controller and synchronize the GPUI native-surface portal bounds. Keep the existing macOS path unchanged. Co-authored-by: Codex <codex@openai.com>
Member
Author
|
Windows implementation checkpoint: |
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gpui-wry, including stale-caret cleanupCargo.tomlDepends on zed-industries/zed#61945
Current scope
The macOS visual stack, focus handoff, clipboard shortcuts, and modal/outside-click behavior are validated. While any top-plane primitive exists, the full transparent overlay view captures input; fine-grained pass-through regions remain part of the documented production native-surface portal design. Windows CompositionController and Linux hosting are documented follow-ups rather than claims of this PR.
Focus and clipboard ownership
gpui-wryowns the native focus boundary instead of adding WebView-specific behavior to GPUI. A lifecycle-scoped localNSEventmonitor native-hit-tests direct WKWebView clicks and clears GPUI logical focus. The existing GPUI mouse listener covers the overlay-active path, including dismissing a Popover by clicking the WebView region.The example installs standard Edit-menu actions for Cut, Copy, Paste, and Select All. AppKit routes
Cmd+C,Cmd+V,Cmd+X, andCmd+Athrough the active WKWebView or GPUI responder.Test Plan
cargo check -p gpui-wry -p webviewCmd+CandCmd+Vgit diff --check