aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c4
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;