GNOME Bugzilla – Bug 743615
evdev: Ignore non seat wide button or key events
Last modified: 2021-06-10 11:31:18 UTC
Ignore button or key events if for the same seat the button or key was already pressed by some other device. This avoids press -> press -> release -> release for the same key.
Created attachment 295606 [details] [review] evdev: Ignore non seat wide keyboard key events Keyboard key events will be received from a device where a key has been pressed, even though an equivalent key has been pressed (same key code) on a device connected to the same seat. notify_key() expects to only be called as if there was only one keyboard device associated with the given seat, so to achieve this, ignore every event where forwarding it would result in multiple 'pressed' or 'released' notifications.
Created attachment 295607 [details] [review] evdev: Ignore non seat wide pointer button events Pointer button events will be received from a device where a button has been pressed, even though an equivalent button has been pressed (same button code) on a device connected to the same seat. notify_button() expects to only be called as if there was only one pointer device associated with the given seat, so to achieve this, ignore every event where forwarding it would result in multiple 'pressed' or 'released' notifications.
Review of attachment 295606 [details] [review]: looks fine to me
Review of attachment 295607 [details] [review]: likewise
Review of attachment 295606 [details] [review]: LGTM
Review of attachment 295607 [details] [review]: LGTM
Review of attachment 295606 [details] [review]: ::: clutter/evdev/clutter-device-manager-evdev.c @@ +1130,3 @@ + + /* Ignore key events that are not seat wide state changes. */ + if ((key_state == LIBINPUT_KEY_STATE_PRESSED && actually, sorry, this isn't right although it works. key_state here is a "boolean", see above, so the fact that it matches the enum LIBINPUT_KEY_STATE_PRESSED/RELEASED values is just chance anyway, easy fix, and it's the same for the other patch
Created attachment 308759 [details] [review] evdev: Don't compare clutter button state to libinput button state The "button state" in clutter is a boolean stored as a unsigned integer. Don't pretend it's a libinput button state, and use it as a boolean. The same for keys.
These patches seems to be applied already. Attached a follow up as per Ruis comment.
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.