mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-15 22:05:24 -05:00
selection: ignore drag-and-drops with unsupported mime-types
Specifically, make sure we do *not* call wl_data_offer_receive() with a NULL mime-type, as this causes libwayland to error out, which in turn causes foot to exit. Closes #1092
This commit is contained in:
parent
bfc53d1e71
commit
2e4da6fbf6
2 changed files with 12 additions and 1 deletions
|
|
@ -2392,6 +2392,12 @@ drop(void *data, struct wl_data_device *wl_data_device)
|
|||
|
||||
struct wl_clipboard *clipboard = &seat->clipboard;
|
||||
|
||||
if (clipboard->mime_type == DATA_OFFER_MIME_UNSET) {
|
||||
LOG_WARN("compositor called data_device::drop() "
|
||||
"even though we rejected the drag-and-drop");
|
||||
return;
|
||||
}
|
||||
|
||||
struct dnd_context *ctx = xmalloc(sizeof(*ctx));
|
||||
*ctx = (struct dnd_context){
|
||||
.term = term,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue