Repository navigation
examples: select events after synchronous requests - #65
Closed
marler8997 wants to merge 1 commit into
Closed
marler8997 wants to merge 1 commit into
marler8997 wants to merge 1 commit into
Conversation
Some servers (e.g. MobaXterm's Moba/X) send ConfigureNotify as soon as a window is created. The dbe, present, draw and testexample examples selected StructureNotify in CreateWindow and then did synchronous requests, so the ConfigureNotify arrived while waiting for a reply and failed with "expected Reply but got ConfigureNotify". Select events with ChangeWindowAttributes just before MapWindow instead. Amp-Thread-ID: https://ampcode.com/threads/T-01a14b88-aff8-717e-bb9f-364137832240 Co-authored-by: Amp <amp@ampcode.com>
This was referenced Oct 17, 2026
Owner
Author
|
Superseded by #68. |
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.
Some servers (e.g. MobaXterm's Moba/X) send a ConfigureNotify as soon as a window is created. dbe, present, draw and testexample selected StructureNotify in
CreateWindowand then did synchronous requests (QueryExtension, QueryTextExtents, ...), so the event arrived while waiting for a reply:These examples now select their events with
ChangeWindowAttributesjust beforeMapWindow, after all synchronous requests. The other examples only select events that can't arrive before the window is mapped (Exposure, KeyPress, PointerMotion).Verified with a proxy in front of Xvfb that injects a ConfigureNotify after any
CreateWindowthat selects StructureNotify (mimicking Moba/X): all four examples failed with the error above before this change and run normally after it.zig build test-non-interactivepasses.https://ampcode.com/threads/T-01a14b88-aff8-717e-bb9f-364137832240