wayland/data-device: Use correct selection type to get mime types

When primary_offer_receive checks if the requested mime_type is supported,
it should check against the list of mime-types supported by the
primary-selection, instead of the list for the clipboard.

This fixes primary selection copy paste from X11 apps to Wayland apps
not working.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/702
This commit is contained in:
Hans de Goede 2019-08-14 11:39:28 +02:00
parent 0521706617
commit 782056adab

View File

@ -520,7 +520,7 @@ primary_offer_receive (struct wl_client *client, struct wl_resource *resource,
gboolean found; gboolean found;
mime_types = meta_selection_get_mimetypes (meta_display_get_selection (display), mime_types = meta_selection_get_mimetypes (meta_display_get_selection (display),
META_SELECTION_CLIPBOARD); META_SELECTION_PRIMARY);
found = g_list_find_custom (mime_types, mime_type, (GCompareFunc) g_strcmp0) != NULL; found = g_list_find_custom (mime_types, mime_type, (GCompareFunc) g_strcmp0) != NULL;
g_list_free_full (mime_types, g_free); g_list_free_full (mime_types, g_free);