wayland: selectively cancel key repeat on key release
authorDan Torop <dant@pnym.net>
Thu, 13 Apr 2017 14:37:22 +0000 (10:37 -0400)
committerOlivier Fourdan <ofourdan@redhat.com>
Fri, 2 Jun 2017 17:18:05 +0000 (19:18 +0200)
commitd9a9530f285436c248524bc6def28b3c1d852b22
tree214fe1f1975c2cef0e6ce0f8977b5eda046cc62e
parent2d41d772d76a624b6485763896c5801c52b550a3
wayland: selectively cancel key repeat on key release

Under Wayland, when multiple keys are pressed and the user releases a
key, key repeat should continue unless the key released is the one
currently repeating.

In the case of:

- key1 press
- key1 repeat
- key2 press -> key1 repeat stopped
- key2 repeat
- key2 release

The behavior should be to cancel keyboard repeat, though key1 is still
held down. This is consistent with prior X11/XWayland behavior.

The following also must work:

- key1 press
- key2 press
- key2 release
- key2 press
- key1 release
- key2 should continue to repeat

The fix for bug #778019 should continue to work:

- key1 press
- key1 repeat
- key2 press -> key1 repeat stopped
- key1 release
- key2 should repeat

The choice to change the counter nkeys to the flag repeat_active
helps to solve the second test case.

https://bugzilla.gnome.org/show_bug.cgi?id=781285
gdk/wayland/gdkdevice-wayland.c