Repository navigation
fix: keep setIgnoreMouseEvents(true) in effect on Linux and support it on Wayland - #54375
Merged
Merged
Conversation
…t on Wayland Since the 43 frame-view refactor the tree host's frame-hint pass resets the window input region on every bounds, state and theme change, which undid the X11 input shape that setIgnoreMouseEvents(true) had set directly. Keep the ignore state on the window and apply it from the frame-hint pass through PlatformWindow::SetInputRegion instead. That path is implemented for Wayland toplevels as well, so the call now also works there.
MarshallOfSound
approved these changes
Sep 25, 2026
|
Release Notes Persisted
|
MarshallOfSound
deleted the
fix-linux-ignore-mouse-events-input-region
branch
September 25, 2026 16:11
Contributor
|
I was unable to backport this PR to "43-x-y" cleanly; |
This was referenced Sep 25, 2026
Contributor
|
I have automatically backported this PR to "44-x-y", please check out #54393 |
Contributor
|
I have automatically backported this PR to "45-x-y", please check out #54394 |
Contributor
|
@codebytere has manually backported this PR to "43-x-y", please check out #54423 |
codebytere
added a commit
that referenced
this pull request
Sep 26, 2026
…t on Wayland (#54423) fix: keep setIgnoreMouseEvents(true) in effect on Linux and support it on Wayland (#54375) Since the 43 frame-view refactor the tree host's frame-hint pass resets the window input region on every bounds, state and theme change, which undid the X11 input shape that setIgnoreMouseEvents(true) had set directly. Keep the ignore state on the window and apply it from the frame-hint pass through PlatformWindow::SetInputRegion instead. That path is implemented for Wayland toplevels as well, so the call now also works there. (cherry picked from commit ccf74d5)
4 tasks done
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
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 firstsetBounds()or show after the call wiped it. Only the X11 branch existed, hence nothing on Wayland.The ignore state now lives on
NativeWindowViewsand is applied at the end ofUpdateFrameHints()throughPlatformWindow::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 aftersetBounds()(main resets it to the full window), full again aftersetIgnoreMouseEvents(false). Wayland verified by reading; no spec because CI cannot read the input shape.Checklist
Release Notes
Notes:
setIgnoreMouseEvents(true)being undone by the next resize on X11.setIgnoreMouseEventssupport on Wayland.