mirror of
https://github.com/mpv-player/mpv
synced 2025-04-17 20:58:20 +00:00
wayland: avoid misleading log messages on drag/drop
In data_offer_actions, it's possible to get the WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE action which would set wl->dnd_action to DND_APPEND (did nothing in practice) but also log a message which is confusing and misleading. Instead, just ignore and don't do anything when we get this case.
This commit is contained in:
parent
1c82d6ae7a
commit
2f8d9322fd
@ -534,10 +534,12 @@ static void data_offer_source_actions(void *data, struct wl_data_offer *offer, u
|
||||
static void data_offer_action(void *data, struct wl_data_offer *wl_data_offer, uint32_t dnd_action)
|
||||
{
|
||||
struct vo_wayland_state *wl = data;
|
||||
wl->dnd_action = dnd_action & WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY ?
|
||||
DND_REPLACE : DND_APPEND;
|
||||
MP_VERBOSE(wl, "DND action is %s\n",
|
||||
wl->dnd_action == DND_REPLACE ? "DND_REPLACE" : "DND_APPEND");
|
||||
if (dnd_action) {
|
||||
wl->dnd_action = dnd_action & WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY ?
|
||||
DND_REPLACE : DND_APPEND;
|
||||
MP_VERBOSE(wl, "DND action is %s\n",
|
||||
wl->dnd_action == DND_REPLACE ? "DND_REPLACE" : "DND_APPEND");
|
||||
}
|
||||
}
|
||||
|
||||
static const struct wl_data_offer_listener data_offer_listener = {
|
||||
|
Loading…
Reference in New Issue
Block a user