Plugins: drain queued X11 editor events - #90
Merged
Conversation
Xlib round trips can move editor events off the socket and leave them in its private queue, so a socket-only event source no longer wakes. Drain those events after guarded callbacks and opening the editor, with bounded follow-up passes. Keep one X connection alive throughout the editor test so Xvfb cannot reset between close and reopen checks.
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.
Changes
Fixes the native-editor failure in the post-merge CI run for #89, https://github.com/emaspa/openxlr/actions/runs/34685246897. The failure was pre-existing and unrelated to the startup-options changes.
Xlib can consume socket events while waiting for a reply and retain them in its own queue. A PipeWire source watching socket readability then has nothing to wake on. Drain that queue after opening the editor and after guarded callbacks, with bounded follow-up passes after each event pump.
The test also keeps one X connection open throughout its run. This prevents Xvfb resetting between the editor's close and reopen checks.
Verification
taskset -c 0.No version or release changes. Plugin-folder management is separate from this patch.