Skip to content

refactor: replace OpaqueFrameView with ElectronFrameViewLinux#51161

Open
aiddya wants to merge 3 commits intoelectron:mainfrom
aiddya:efvl-refactor
Open

refactor: replace OpaqueFrameView with ElectronFrameViewLinux#51161
aiddya wants to merge 3 commits intoelectron:mainfrom
aiddya:efvl-refactor

Conversation

@aiddya
Copy link
Copy Markdown
Contributor

@aiddya aiddya commented Apr 20, 2026

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

Release Notes

Notes:

  • Fixed runtime toggling of shadows for frameless windows on Linux.
  • Added support for system-configured button layouts in Window Controls Overlay on Linux.

@aiddya aiddya requested a review from a team as a code owner April 20, 2026 01:51
@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Apr 20, 2026
@aiddya
Copy link
Copy Markdown
Contributor Author

aiddya commented Apr 20, 2026

Depends on #51160

aiddya added 2 commits April 20, 2026 23:50
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-pr 🌱 PR opened recently

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant