[ENH] Making Squeak use the Unix clipboard properly
bert at isg.cs.uni-magdeburg.de
Fri Apr 12 22:01:33 UTC 2002
On Fri, 12 Apr 2002, Ned Konz wrote:
> On Thursday 11 April 2002 02:46 pm, Bert Freudenberg wrote:
> > On Thu, 11 Apr 2002, Ned Konz wrote:
> > > Bert suggested making clipboard text *from* Squeak be available
> > > as both PRIMARY and CLIPBOARD, and copying only the PRIMARY *to*
> > > Squeak.
> > >
> > > Since this seemed reasonable to me, I did it.
> > Great! I committed that to SF.
> Unfortunately, it still doesn't do the right thing. Perhaps others
> have an idea.
> The problem is that it is possible to put something in the CLIPBOARD
> that was never in PRIMARY. For instance, I can right-button your name
> in my mail reader and choose "copy to clipboard". Or I can copy a URL
> from my browser. In neither case does PRIMARY get touched; only
> CLIPBOARD gets set.
> Alas, unless Squeak owned the CLIPBOARD selection, it never gets
> notified that the selection there has changed (and that happens only
> indirectly through a SelectionClear event).
> Likewise, we can't tell how fresh the selections are. We can query for
> owners of the CLIPBOARD and/or PRIMARY, but then we'd have to prefer
> one over the other (perhaps CLIPBOARD) if they were both set. The
> problem with this is that if you had a prior CLIPBOARD set from
> another app that wasn't from a selection you'd always get it until
> you copied from Squeak.
> Or we could get both selections, compare them, and append them if they
> weren't the same (but this could be a mess).
> I could see making a commandline switch to specify which selection is
> preferred; in my system there is little use for PRIMARY any more.
I wish there was another way, but this seems to be the only practical
Does anybody know if making CLIPBOARD be the default source for
pasting hurts other X environments (not Gnome/KDE), like on Solaris,
> Interestingly, in the Konsole terminal program, it seems to do an
> automatic copy to CLIPBOARD when you make a selection. Though this is
> ugly, it works with the rest of KDE/Qt3.0.
You mean it provides both PRIMARY and CLIPBOARD? That would then be
equivalent to what Squeak does now with your fix. So we're on the right
More information about the Squeak-dev