aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-08-22 14:30:52 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-08-25 16:56:15 +0000
commit1707db167815348eff3a3e8e7c5a73130df678ca (patch)
treec452f0945dca53b31aee4acda48648bcb3be7e21 /selection.c
parentselection: must use term_paste_data_to_slave() for paste data (diff)
selection: don't initiate a paste when we're already pasting
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c10
1 files changed, 10 insertions, 0 deletions
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;