codebytere

#54487: fix: apply the X11 input shape before setIgnoreMouseEvents() returns

Merged
Created: Sep 27, 2026, 8:58:14 AM
Merged: Sep 28, 2026, 1:02:00 AM
4 comments
Target: main

Description of Change

On X11, setIgnoreMouseEvents() did not take effect until the main process next went back to its event loop. The XShape request sat in the client-side output buffer, so a window kept receiving (or kept ignoring) mouse events for as long as the caller stayed busy after the call.

The call now round-trips to the X server after updating the input region. A flush is not enough: it only writes the request to the socket, and the server makes no ordering promise between clients, so only a reply shows the shape is in place before another client's next request is handled. Wayland is unchanged - the region applies with the next surface commit, which is already forced, and blocking the UI thread on a compositor round-trip isn't appropriate. The forced redraw is now Wayland-only since X11 never needed it.

Verified under Xvfb by reading the input shape from a second X client while the main thread was busy right after the call: 1x1 after setIgnoreMouseEvents(true) and the full window after false, where main still reports the previous shape at both points. No new spec because CI cannot read the input shape.

Checklist

Release Notes

Notes: Fixed setIgnoreMouseEvents() taking effect late on X11.

Backports

43-x-y
Merged
PR Number
#54498
Merged At
Sep 28, 2026, 7:51:09 AM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#54497
Merged At
Sep 28, 2026, 7:41:47 AM
Released In
Not yet
Release Date
Not yet
45-x-y
Merged
PR Number
#54496
Merged At
Sep 28, 2026, 7:51:10 AM
Released In
v45.0.0-alpha.13
Release Date
Sep 28, 2026, 3:00:19 PM

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