GNOME Bugzilla – Bug 783791
Incorrect button mask used when handling button events
Last modified: 2021-06-10 11:30:55 UTC
While browsing through the code to diagnose an unrelated issue, I noticed that Clutter is using the wrong mask when a middle- or right-click is received. See [1]. Evdev event codes 272 (BTN_LEFT), 273 (BTN_RIGHT), and 274 (BTN_MIDDLE) are assigned the proper clutter button number, but the mask is incorrect. I'm unsure what real-world effects this has, but I have confirmed with Carlos Garnacho in a private email that the code is indeed incorrect. [1]: https://git.gnome.org/browse/clutter/tree/clutter/wayland/clutter-input-device-wayland.c#n130
Created attachment 353756 [details] [review] Fix for issue
Created attachment 353758 [details] [review] Use defines instead of magic numbers Carlos suggested a second patch as well which has Clutter use defines rather than magic numbers. I noticed that many of the backends also use magic numbers so I fixed the instances I could find.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of clutter, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a ticket at https://gitlab.gnome.org/GNOME/clutter/-/issues/ Thank you for your understanding and your help.