From 1707db167815348eff3a3e8e7c5a73130df678ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 22 Aug 2020 16:30:52 +0200 Subject: [PATCH] selection: don't initiate a paste when we're already pasting --- selection.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/selection.c b/selection.c index f86814a1..9428adff 100644 --- a/selection.c +++ b/selection.c @@ -1204,6 +1204,11 @@ from_clipboard_done(void *user) void selection_from_clipboard(struct seat *seat, struct terminal *term, uint32_t serial) { + if (term->is_sending_paste_data) { + /* We're already pasting... */ + return; + } + struct wl_clipboard *clipboard = &seat->clipboard; if (clipboard->data_offer == NULL) return; @@ -1317,6 +1322,11 @@ selection_from_primary(struct seat *seat, struct terminal *term) if (term->wl->primary_selection_device_manager == NULL) return; + if (term->is_sending_paste_data) { + /* We're already pasting... */ + return; + } + struct wl_clipboard *clipboard = &seat->clipboard; if (clipboard->data_offer == NULL) return;