[client] clipboard/wayland: make DnD a no-op

Wayland requires us to set all listeners, even for events we don't care
about. Not doing so caused Looking Glass to abort when used as a drop
target.
This commit is contained in:
Tudor Brindus 2021-01-14 00:20:29 -05:00 committed by Geoffrey McRae
parent 17691f889b
commit dc17492750

View File

@ -178,7 +178,7 @@ static const char * wayland_cb_getName()
// Destination client handlers. // Destination client handlers.
static void dataHandleOffer(void * data, struct wl_data_offer * offer, static void dataOfferHandleOffer(void * data, struct wl_data_offer * offer,
const char * mimetype) const char * mimetype)
{ {
enum LG_ClipboardData type = mimetypeToCbType(mimetype); enum LG_ClipboardData type = mimetypeToCbType(mimetype);
@ -195,8 +195,22 @@ static void dataHandleOffer(void * data, struct wl_data_offer * offer,
} }
} }
static void dataOfferHandleSourceActions(void * data,
struct wl_data_offer * offer, uint32_t sourceActions)
{
// Do nothing.
}
static void dataOfferHandleAction(void * data, struct wl_data_offer * offer,
uint32_t dndAction)
{
// Do nothing.
}
static const struct wl_data_offer_listener dataOfferListener = { static const struct wl_data_offer_listener dataOfferListener = {
.offer = dataHandleOffer, .offer = dataOfferHandleOffer,
.source_actions = dataOfferHandleSourceActions,
.action = dataOfferHandleAction,
}; };
static void dataDeviceHandleDataOffer(void * data, static void dataDeviceHandleDataOffer(void * data,