Re: [dev] st: selecting text affects both primary and clipbaord

From: Christoph Lohmann <>
Date: Sat, 14 Mar 2015 07:39:29 +0100


On Sat, 14 Mar 2015 07:39:29 +0100 Alex Pilon <> wrote:
> > On 03/10/2015 10:49 PM, Alex Pilon wrote:
> > > Are you thinking of something like the attached?
> >
> On Wed, Mar 11, 2015 at 01:01:11PM -0400, Greg Reagle wrote:
> > That looks fine to me, looking at it briefly, but I haven't tested it (yet).
> Sorry about the noise. It *seemed* to work before; serves me right. I
> completely misunderstood X selection management. Here's what I think is
> a fixed patch.
> Also, I removed the selection clear event handler registration. I just
> didn't like the visual selection being cleared just because I set it in
> another program. Remove that hunk if you disagree.

Thanks for sending in the patch. I applied it with some minor changes:

        * the clipboard atom has to be requested via XInternAtom
        * xstrdup instead of strdup
        * the primary selection could be empty when someone is asking to copy
          to the clipboard
        * the SelectionClear X11 event is now a comment so someone too
          passionate about it can remove the comment


Christoph Lohmann
Received on Sat Mar 14 2015 - 07:39:29 CET

This archive was generated by hypermail 2.3.0 : Sat Mar 14 2015 - 07:48:07 CET