Currently, XCB hands errors and events back to the caller exactly as they were read off the wire. This should be changed to hand back an additional four bytes with the full 32-bit sequence number. For compatibility with XCBGenericReply and Xlib's xReply/xEvent/xError, I'd like to add this new field after the raw bytes.
The XSLT in c-client.xsl probably ought to generate structures with full_sequence elements at the end, so that the full sequence number is accessible without casting back to XCBGenericEvent or XCBGenericError. I don't know how to do that correctly. Probably we need to track the size in bytes for every type in the X protocol, so that we can tell how much padding to insert before the full_sequence field.
This seems like it was fixed ages ago with the full_sequence field: commit 255c21b17f61147388bab6e1d42623a008a4a8d2 Author: Jamey Sharp <jamey@minilop.net> Date: Fri Mar 3 01:45:00 2006 -0800 Add 32-bit full_sequence fields to generic errors and events, so callers can always correlate events and errors with requests correctly. However, since this commit is from the very same day that this bug report is from, I feel like I missed something. What did I miss that stops this from getting closed?
1. The field is missing on replies. (comment #0) 2. To access the field one still needs to cast the event or error to xcb_generic_event_t or xcb_generic_error_t. (comment #1) Atm. I'm looking at it (for XI2), because it's injected at the 32b boundary of the structure and this causes problems with X Generic Events bigger then that.
(In reply to comment #3) > 1. The field is missing on replies. (comment #0) > 2. To access the field one still needs to cast the event or error to > xcb_generic_event_t or xcb_generic_error_t. (comment #1) > > Atm. I'm looking at it (for XI2), because it's injected at the 32b boundary > of the structure and this causes problems with X Generic Events bigger then > that. An attempt to fix the XGEs and the other 2 open points on the way: [RFC libxcb 0/2] full sequence for everyone http://lists.freedesktop.org/archives/xcb/2013-February/008165.html
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/lib/libxcb/issues/29.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.