diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2022-06-20 18:57:26 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2022-06-20 18:57:26 +0000 |
| commit | 6d4d4502e9188a07751b71b0bde7448e3e9eeef4 (patch) | |
| tree | b8768aa025b72f3ea3a4344946cc79e8bed2ead4 | |
| parent | selection: explicitly reject *all* dnd offers not targeting the grid (diff) | |
selection: reject dnd offers with unsupported mime-types
We were already doing this, implicitly, *if* the offer was for the
main grid.
This patch makes it more clear that we do not accept the offer.
| -rw-r--r-- | selection.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/selection.c b/selection.c index 63170b98..c62bdb2b 100644 --- a/selection.c +++ b/selection.c @@ -2322,6 +2322,9 @@ enter(void *data, struct wl_data_device *wl_data_device, uint32_t serial, xassert(offer == seat->clipboard.data_offer); + if (seat->clipboard.mime_type == DATA_OFFER_MIME_UNSET) + goto reject_offer; + /* Remember _which_ terminal the current DnD offer is targeting */ xassert(seat->clipboard.window == NULL); tll_foreach(wayl->terms, it) { @@ -2340,6 +2343,7 @@ enter(void *data, struct wl_data_device *wl_data_device, uint32_t serial, } } +reject_offer: /* Either terminal is already busy sending paste data, or mouse * pointer isn’t over the grid */ seat->clipboard.window = NULL; |
