From 3be645a357c93927f6edcc7f1b5b0e83060d2472 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 27 May 2021 18:37:17 +1000 Subject: [PATCH] [client] x11: fix BadAtom when pasting large buffers To start a clipboard incr transfer the client has to delete the INCR window property as the reply to the selection. This deletion generates a property change event with the type delete, errornously triggering the incr processing of the data. This patch corrects this by ignoring property deletions. --- client/displayservers/X11/clipboard.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/displayservers/X11/clipboard.c b/client/displayservers/X11/clipboard.c index 967f7dbd..2387c28f 100644 --- a/client/displayservers/X11/clipboard.c +++ b/client/displayservers/X11/clipboard.c @@ -76,6 +76,9 @@ bool x11CBEventThread(const XEvent xe) return true; case PropertyNotify: + if (xe.xproperty.state != PropertyNewValue) + break; + if (xe.xproperty.atom == x11atoms.SEL_DATA) { if (x11cb.lowerBound == 0)