From aaa467679d8ea592856a6a472584ba4988f68dcc Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 9 Mar 2016 17:30:29 +0100 Subject: [PATCH] wayland: Make data_source_target() an empty stub This request actually means nothing to the upper GDK layers, we used to preempt a GDK_SELECTION_REQUEST event, but this is too eager, and not like things work in X11. Originally in wayland, this event may be used for feedback purposes. We however don't perform any mimetype-based feedback, so we can safely ignored. This makes data_source_send() the only place where we actually trigger GDK_SELECTION_REQUEST, this one is conceptually the same than the X11 selection request event. --- gdk/wayland/gdkselection-wayland.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/gdk/wayland/gdkselection-wayland.c b/gdk/wayland/gdkselection-wayland.c index e1dd69b96a..d6555d54cd 100644 --- a/gdk/wayland/gdkselection-wayland.c +++ b/gdk/wayland/gdkselection-wayland.c @@ -823,34 +823,8 @@ data_source_target (void *data, struct wl_data_source *source, const char *mime_type) { - GdkWaylandSelection *wayland_selection = data; - GdkWindow *window = NULL; - GdkAtom selection; - g_debug (G_STRLOC ": %s source = %p, mime_type = %s", G_STRFUNC, source, mime_type); - - if (!mime_type) - return; - - if (source == wayland_selection->dnd_source) - { - selection = atoms[ATOM_DND]; - window = wayland_selection->dnd_owner; - } - else if (source == wayland_selection->clipboard_source) - { - selection = atoms[ATOM_CLIPBOARD]; - window = wayland_selection->clipboard_owner; - } - - if (!window) - return; - - gdk_wayland_selection_request_target (wayland_selection, window, - selection, - gdk_atom_intern (mime_type, FALSE), - -1); } static void