#54375: fix: keep setIgnoreMouseEvents(true) in effect on Linux and support it on Wayland
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
- I have built and tested this change
- I have filled out the PR description
- I have reviewed and verified the changes
- relevant API documentation, tutorials, and examples are updated and follow the documentation style guide
Release Notes
Notes:
- Fixed
setIgnoreMouseEvents(true)being undone by the next resize on X11. - Added
setIgnoreMouseEventssupport on Wayland.
Backports
Semver Impact
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