Subject: bug#49728: x11 primary selection with mouse

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 21 Aug 2022 20:19:40 +0200

Johannes Martinez <[email-masked]> writes:

> Hi, I'm writing a clipboard manager and notice some odd behaviour with
> emacs.  It seems to be setting the primary selection while mouse
> button is down and not on button up. So what happens is that you're
> continuously setting the selection as the user fiddles the mouse the
> highlight just the text they want.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

You didn't say what Emacs version you saw this in -- is this still
happening in recent Emacs versions?  I had a very quick look at
`gui-set-selection' in Emacs 29, and it seems to be called on mouse-up
there.