forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
f61965233b
commit
aaa467679d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user