Skip to content
  • Dan Torop's avatar
    wayland: selectively cancel key repeat on key release · d9a9530f
    Dan Torop authored and Olivier Fourdan's avatar Olivier Fourdan committed
    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
    d9a9530f