gdk/wayland: Add support for primary-selection-unstable-v1

Additionally to gtk_primary_selection, the gtk-private predecessor,
support the upstream unstable protocol.

This allows the primary selection to work on Kwin and potentially
other compositors, as well as dropping the private version eventually.

Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/2591
This commit is contained in:
Robert Mader
2020-09-26 15:33:59 +02:00
parent d3cd68f11d
commit 5bd8f8c5a3
9 changed files with 238 additions and 66 deletions

View File

@ -191,8 +191,8 @@ struct wl_data_device * gdk_wayland_device_get_data_device (GdkDevice *gdk_devic
void gdk_wayland_seat_set_selection (GdkSeat *seat,
struct wl_data_source *source);
void gdk_wayland_seat_set_primary (GdkSeat *seat,
struct gtk_primary_selection_source *source);
void gdk_wayland_seat_set_primary (GdkSeat *seat,
gpointer source);
GdkDragContext * gdk_wayland_device_get_drop_context (GdkDevice *gdk_device);
@ -249,8 +249,8 @@ void gdk_wayland_selection_free (GdkWaylandSelection *selection);
void gdk_wayland_selection_ensure_offer (GdkDisplay *display,
struct wl_data_offer *wl_offer);
void gdk_wayland_selection_ensure_primary_offer (GdkDisplay *display,
struct gtk_primary_selection_offer *wp_offer);
void gdk_wayland_selection_ensure_primary_offer (GdkDisplay *display,
gpointer wp_offer);
void gdk_wayland_selection_set_offer (GdkDisplay *display,
GdkAtom selection,