refactor: replace OpaqueFrameView with ElectronFrameViewLinux#51161
Open
aiddya wants to merge 3 commits intoelectron:mainfrom
Open
refactor: replace OpaqueFrameView with ElectronFrameViewLinux#51161aiddya wants to merge 3 commits intoelectron:mainfrom
aiddya wants to merge 3 commits intoelectron:mainfrom
Conversation
Contributor
Author
|
Depends on #51160 |
This was referenced Apr 20, 2026
Replace ClientFrameViewLinux with electron::NativeFrameViewLinux, a thin wrapper over views::NativeFrameViewLinux. The wrapper provides Electron integration, such as draggable region support in NonClientHitTest, and adapting to Electron's sizing conventions. ElectronDesktopWindowTreeHostLinux and NativeWindowViews now use FrameViewLinux to query frame geometry and update window states in addition to LinuxFrameLayout. Assisted-By: Claude Opus 4.6, Claude Code
Replace OpaqueFrameView with ElectronFrameViewLinux, rebased on the new Chromium FrameViewLinux class. This orphans LinuxFrameLayout, which is now removed. ElectronDesktopWindowTreeHostLinux now invokes FrameViewLinux methods on window changes like transparency and shadows. ElectronFrameViewLayoutLinux extends FrameViewLayoutLinux to handle three modes: shadow-only, WCO, and transparent. It overrides frame geometry methods from the base class for these modes and adds a few new ones for WCO. Assisted-By: Claude Opus 4.6, Claude Code
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.
Description of Change
Replace OpaqueFrameView with ElectronFrameViewLinux, rebased on the new Chromium FrameViewLinux class. This orphans LinuxFrameLayout, which is now removed. ElectronDesktopWindowTreeHostLinux now invokes FrameViewLinux methods on window changes like transparency and shadows.
ElectronFrameViewLayoutLinux extends FrameViewLayoutLinux to handle three modes: shadow-only, WCO, and transparent. It overrides frame geometry methods from the base class for these modes and adds a few new
ones for WCO.
As the base FrameViewLinux class respects user preferences on window controls, ElectronFrameViewLinux has been changed to match. WCO can now show user-configured buttons in either all-trailing, all-leading or a
mix of leading and trailing order.
Instead of drawing an inside resize border for frameless without shadow mode, we instead set shadow to none and let the frame border insets collapse to the resize band. This ensures consistent resize behavior across modes, which is a 10 px band all around the client/frame area. It also allows us to do neat things like runtime toggling of shadows, which has now been implemented on Linux.
Checklist
npm testpassesRelease Notes
Notes: