mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
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.
This commit is contained in:
parent
0d22e9fa01
commit
6d4d4502e9
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue