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 673458 - GdkEventButton contains wrong buttons in modifier mask for button releases
GdkEventButton contains wrong buttons in modifier mask for button releases
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-04-03 21:14 UTC by Hans de Goede
Modified: 2012-04-07 00:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Small program to reproduce the bug (1.17 KB, text/plain)
2012-04-03 21:14 UTC, Hans de Goede
  Details
Don't force BUTTON1_MASK on non-touch events (1.12 KB, patch)
2012-04-07 00:28 UTC, Matthias Clasen
committed Details | Review

Description Hans de Goede 2012-04-03 21:14:49 UTC
Created attachment 211250 [details]
Small program to reproduce the bug

While debugging an issue with spice-gtk I eventually found out that gdk3 is reporting a wrong modifier mask for button release events for buttons > 1. The problem is that the modifier mask always contains the GDK_BUTTON1_MASK for release events even if button1 was not pressed at the time of the release.

I've seen this with a fully up2date Fedora-17 on 2 different machines.

Attached it a simply reproducer, running this and then pressing buttons 1 - 3 in succession (releasing each one before pressing the next) gives the following output:
press,   button 1, mask 0x0000
release, button 1, mask 0x0100
press,   button 2, mask 0x0000
release, button 2, mask 0x0300
press,   button 3, mask 0x0000
release, button 3, mask 0x0500
Comment 1 Matthias Clasen 2012-04-07 00:28:24 UTC
The following fix has been pushed:
2ef4b93 Don't force BUTTON1_MASK on non-touch events
Comment 2 Matthias Clasen 2012-04-07 00:28:27 UTC
Created attachment 211519 [details] [review]
Don't force BUTTON1_MASK on non-touch events

This problem was pointed out by Hans de Goede in