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 743615 - evdev: Ignore non seat wide button or key events
evdev: Ignore non seat wide button or key events
Status: RESOLVED OBSOLETE
Product: clutter
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2015-01-28 04:16 UTC by Jonas Ådahl
Modified: 2021-06-10 11:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
evdev: Ignore non seat wide keyboard key events (2.12 KB, patch)
2015-01-28 04:16 UTC, Jonas Ådahl
committed Details | Review
evdev: Ignore non seat wide pointer button events (2.22 KB, patch)
2015-01-28 04:16 UTC, Jonas Ådahl
committed Details | Review
evdev: Don't compare clutter button state to libinput button state (1.97 KB, patch)
2015-08-05 03:36 UTC, Jonas Ådahl
none Details | Review

Description Jonas Ådahl 2015-01-28 04:16:00 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.
Comment 1 Jonas Ådahl 2015-01-28 04:16:02 UTC
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.
Comment 2 Jonas Ådahl 2015-01-28 04:16:05 UTC
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.
Comment 3 Rui Matos 2015-02-03 15:40:49 UTC
Review of attachment 295606 [details] [review]:

looks fine to me
Comment 4 Rui Matos 2015-02-03 15:42:31 UTC
Review of attachment 295607 [details] [review]:

likewise
Comment 5 Emmanuele Bassi (:ebassi) 2015-02-03 15:43:59 UTC
Review of attachment 295606 [details] [review]:

LGTM
Comment 6 Emmanuele Bassi (:ebassi) 2015-02-03 15:44:28 UTC
Review of attachment 295607 [details] [review]:

LGTM
Comment 7 Rui Matos 2015-02-03 15:50:27 UTC
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
Comment 8 Jonas Ådahl 2015-08-05 03:36:13 UTC
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.
Comment 9 Jonas Ådahl 2015-08-05 03:37:20 UTC
These patches seems to be applied already. Attached a follow up as per Ruis comment.
Comment 10 André Klapper 2021-06-10 11:31:18 UTC
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.