Subject: bug#11772: 24.1; A click changes the primary selection

From: Chong Yidong <[email-masked]>
Date: Sun, 08 Jul 2012 14:10:26 +0800

Vincent Lefevre <[email-masked]> writes:

> 1. Run "emacs -Q" under X.
> 2. Select something in the Emacs window, e.g. "This buffer".
> 3. Select something in some other application that supports the
>    PRIMARY selection, e.g. xterm.
> 4. Optional: paste the PRIMARY selection somewhere (but not in the
>    Emacs window opened above). As expected, one can see that the
>    selection done in (3) is pasted.
> 5. Click somethere in the Emacs window, with the left button.
>    As expected, the selection is no longer highlighted.
> 6. Paste the PRIMARY selection somewhere: it is the one from Emacs
>    (e.g. "This buffer"), i.e. in (2), that is pasted instead of the
>    most recent PRIMARY selection from (3).

Thanks for the extremely clear testcase.  I've committed a fix to trunk.