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)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 19 Oct 2022 11:54:07 +0000 (13:54 +0200)
commiteeda25ab044ee9678c7b68bf580a4d3d7beb62da
tree3848770fa65df658ffd04803a5a81d8097272581
parentacaf04a24e9e641482fc6021659cbe72675f2cfd
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