Skip to content
  • Carlos Garnacho's avatar
    wayland: Do not forget immediately of key press serials on key release · 243890a6
    Carlos Garnacho authored and Marge Bot's avatar Marge Bot committed
    Prior to commit 5dfed8a4, the MetaWaylandKeyboard would always remember
    the last key press serial, and consider it valid after the key was released,
    as long as no other key presses/releases happened in between.
    
    That commit improved things so that MetaWaylandKeyboard can track multiple
    keys being pressed simultaneously, but also changed so that the serial for
    a key press is immediately forgotten after the key press event was received.
    This may break in situations like testing or keyboard macros where key
    press and release is handled in a quick sucession, so the client reaction
    to the key press (e.g. popping up a menu) might arrive too late.
    
    Add a sort of spiritual successor to this handling, and make keyboard
    press serials corresponding to the last key up forgotten at the next
    key press/release received.
    
    Fixes: 5dfed8a4 ("wayland: Preserve serial for all pressed keys")
    Closes: #3458
    Part-of: <!3721>
    243890a6