[client] wayland: handle wl_data_source.target action

There is no action to be taken by the Looking Glass client, but a
handler needs to exist as certain other Wayland clients chooses to
send this message for copy-paste operations despite the fact it's
supposed to be used for drag-and-drop negotiation.
This commit is contained in:
Quantum 2022-08-13 15:57:17 -04:00 committed by Geoffrey McRae
parent 28cba2e2b3
commit f5e68711d0

View File

@ -512,6 +512,13 @@ error:
free(data);
}
static void dataSourceHandleTarget(void * data, struct wl_data_source * source,
const char * mimetype)
{
// Certain Wayland clients send this for copy-paste operations even though
// it only makes sense for drag-and-drop. We just do nothing.
}
static void dataSourceHandleSend(void * data, struct wl_data_source * source,
const char * mimetype, int fd)
{
@ -547,7 +554,8 @@ static void dataSourceHandleCancelled(void * data,
}
static const struct wl_data_source_listener dataSourceListener = {
.send = dataSourceHandleSend,
.target = dataSourceHandleTarget,
.send = dataSourceHandleSend,
.cancelled = dataSourceHandleCancelled,
};