After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 756649 - events: Don't use XIEvent serial numbers
events: Don't use XIEvent serial numbers
Status: RESOLVED NOTGNOME
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2015-10-15 15:23 UTC by Florian Müllner
Modified: 2015-12-22 01:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
events: Don't use XIEvent serial numbers (3.82 KB, patch)
2015-10-15 15:23 UTC, Florian Müllner
accepted-commit_now Details | Review

Description Florian Müllner 2015-10-15 15:23:23 UTC
See patch.
Comment 1 Florian Müllner 2015-10-15 15:23:31 UTC
Created attachment 313383 [details] [review]
events: Don't use XIEvent serial numbers

XInput2 uses the raw sequence number for XIEvent serials, which only
matches the serial number in XEvents up to 16 bits[0]. So in order to
be able to make reliable comparisons with serials from other events or
calls to XNextRequest(), always use the field from the original XEvent
rather than the XIEvent serial (at least until we can get libXi fixed).

This (partially) reverts commit 35dd1e644dbc238.

[0] http://cgit.freedesktop.org/xorg/lib/libX11/tree/src/XlibInt.c#n265
Comment 2 Rui Matos 2015-10-15 16:39:45 UTC
Review of attachment 313383 [details] [review]:

code is fine but the commit message reference to the libX11 code that computes serials for core events is confusing since the bug is actually in libXi's XInputWireToEvent() extension hook.
Comment 3 Peter Hutterer 2015-10-29 02:09:47 UTC
libXi commit 380861589690bcbe8b04b7a2c23b5dd5d10c4bf8 fixes this issue
Comment 4 Jasper St. Pierre (not reading bugmail) 2015-12-21 21:21:34 UTC
Did we go with the libXi fix for this? Closing if so.
Comment 5 Peter Hutterer 2015-12-22 01:27:33 UTC
Thanks for the reminder, I just released libXi 1.7.6 with the fix for this.

http://lists.x.org/archives/xorg-announce/2015-December/002664.html