Commit aaa46767 authored by Carlos Garnacho's avatar Carlos Garnacho

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.
parent f6196523
......@@ -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)
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)
gdk_wayland_selection_request_target (wayland_selection, window,
gdk_atom_intern (mime_type, FALSE),
static void
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment