Skip to content

wayland: Preserve serial for all pressed keys

Carlos Garnacho requested to merge carlosg/mutter:wip/keyboard-serials into main

The current code checking keyboard serials for popup/grab validation is a bit simple, tracking one key press exclusively. This may break expectations if a client uses a serial corresponding to a previous key that is still pressed.

Keep track of the serials corresponding to all pressed keys, and ensure these are reset across focus changes, since the validity of those serials is already outdated. The code does still keep track of a single (last) key release serial, since the validity lifetime is somewhat underdefined with those if we keep track of multiple keys simultaneously.

Closes: #3267 (closed)

Merge request reports