Repository navigation
fix: apply the X11 input shape before setIgnoreMouseEvents() returns - #54487
Merged
Merged
Conversation
The XShape request that setIgnoreMouseEvents() issues on X11 stayed in the client-side output buffer until the UI thread next returned to its message loop, so the window kept receiving (or kept ignoring) mouse events for as long as the caller stayed busy. Round-trip to the server after updating the region. A flush alone only writes the request to the socket; the server gives no ordering guarantee between clients, so only a reply shows that the shape is in place before another client's next request is processed.
MarshallOfSound
approved these changes
Sep 27, 2026
VerteDinde
approved these changes
Sep 27, 2026
|
Release Notes Persisted
|
Contributor
|
I have automatically backported this PR to "45-x-y", please check out #54496 |
Contributor
|
I have automatically backported this PR to "44-x-y", please check out #54497 |
Contributor
|
I have automatically backported this PR to "43-x-y", please check out #54498 |
3 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
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 afterfalse, 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.