Skip to content

fix: edge resizing of frameless windows on Linux/Wayland - #51994

Closed
codebytere wants to merge 1 commit into
41-x-yfrom
41-wayland-resize
Closed

codebytere wants to merge 1 commit into
41-x-yfrom
41-wayland-resize

Conversation

@codebytere

Copy link
Copy Markdown
Member

Manual backport of #51992.

See that PR for details.

Notes: Fixed an issue where resizing didn't work on Wayland in some circumstances.

@codebytere codebytere added backport This is a backport PR 41-x-y labels Jun 15, 2026
@trop trop Bot added the semver/patch backwards-compatible bug fixes label Jun 15, 2026
ElectronFrameViewLinux sits on views::FrameViewLinux, not FramelessView,
so it lost two things FramelessView provides: a TargetForRect that keeps
resize-border events on the frame view, and the kResizeInsideBoundsSize
inside-edge hit band (NativeWindow::NonClientHitTest only re-adds that
when the frame view is a FramelessView). FrameViewLinux's own resize
hit-test only covers GetFrameBorderInsets(), which on Wayland is the
shadow-only outer margin — and that band is zero anyway when
supports_client_frame_shadow_ stays cached at the value read before the
platform window existed.

* electron_desktop_window_tree_host_linux: refresh
  SetSupportsClientFrameShadow() in UpdateFrameHints(), same as
  BrowserDesktopWindowTreeHostLinux, so the layout doesn't keep a stale
  false from widget-init time.
* ElectronFrameViewLinux::NonClientHitTest: when the base class says
  HTCLIENT, re-test with GetFrameBorderInsets() + kResizeInsideBoundsSize
  so there's a 5px resize band just inside the visible edge.
* ElectronFrameViewLinux::TargetForRect: return `this` for the eight
  resize HT components so the overlapping client view doesn't swallow the
  press; scoped to resize codes only so WCO caption-button clicks still
  reach the buttons.

@jkleinsc jkleinsc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Marking as changes requested until #51992 is approved and merged.

@codebytere codebytere closed this Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

41-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants