gdk/wayland: Use serial of the latest implicit grab available
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 19 Oct 2022 10:46:09 +0000 (12:46 +0200)
committerMat <mail@mathias.is>
Sat, 12 Nov 2022 02:14:47 +0000 (04:14 +0200)
commit873c304a9460ab30c4acf8e922605412cbededf8
treee3a0e33e78591e7efaea3093bcab845793e4e6d3
parente551a9d1c4cbd66be04a1c45af172e7b5872f99c
gdk/wayland: Use serial of the latest implicit grab available

When getting the serial for primary/clipboard selections we used a
function that largely relied on a GdkEvent being passed. We have
another available function that looks up the most recent serial
given the ongoing touch/tablet input as well.

This is the second best, compared to actually knowing the
input/device from the event that was received by the UI an triggered
the clipboard operation, and is already in use in other places
(e.g. window dragging). It is valid for these situations too.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5250
gdk/wayland/gdkdevice-wayland.c
gdk/wayland/gdkprimary-wayland.c