codebytere

#54375: fix: keep setIgnoreMouseEvents(true) in effect on Linux and support it on Wayland

Merged
Created: Sep 25, 2026, 7:58:20 AM
Merged: Sep 25, 2026, 11:10:59 AM
4 comments
Target: main

Description of Change

Fixes #52456.

After this change setIgnoreMouseEvents(true) keeps working on X11 after the window is moved, resized, shown or re-themed, and it works on Wayland, where it was a no-op.

Since the 43 frame-view refactor, ElectronDesktopWindowTreeHostLinux::UpdateFrameHints() runs for frameless windows too and resets the platform window's input region on every bounds, state, scale and theme change. setIgnoreMouseEvents(true) still set a 1x1 X input shape directly on the window, so the first setBounds() or show after the call wiped it. Only the X11 branch existed, hence nothing on Wayland.

The ignore state now lives on NativeWindowViews and is applied at the end of UpdateFrameHints() through PlatformWindow::SetInputRegion, which X11 and Wayland toplevels both implement; a redraw is scheduled so Wayland commits the region without waiting for the next paint, and the raw XShape calls are gone. Verified on X11 under Xvfb by reading the input shape: 1x1 after the call and still 1x1 after setBounds() (main resets it to the full window), full again after setIgnoreMouseEvents(false). Wayland verified by reading; no spec because CI cannot read the input shape.

Checklist

Release Notes

Notes:

  • Fixed setIgnoreMouseEvents(true) being undone by the next resize on X11.
  • Added setIgnoreMouseEvents support on Wayland.

Backports

43-x-y
Pending
Waiting for a manual backport
44-x-y
Merged
PR Number
#54393
Merged At
Sep 25, 2026, 1:49:09 PM
Released In
Not yet
Release Date
Not yet
45-x-y
In-flight
PR Number
#54394
Waiting to be merged

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron