gdk/wayland: Proivde latest touch serial even after a touch ended

Jonas Dreßler requested to merge verdre/gtk:provide-touch-serial-later into main

When grabbing the seat for an xdg popup using xdg_popup_grab() in response to a touch-end event, we request the grab a little late and the touch is no longer being tracked by gdkseat. This means that _gdk_wayland_seat_get_last_implicit_grab_serial() right now can not provide us with the serial for that touchpoint, because that serial was stored on the GdkWaylandTouchData that is already gone.

To still provide the compositor a valid serial in that case, store the serial of the latest touchpoint more persistently in GdkWaylandSeat itself, so that we can still access it when the touchpoint has already ended.

This needs mutter!2946 on the mutter side to work.

Merge request reports