[Annoyances] X-Windows Copy & Paste
John Ryland
jryland at trolltech.com
Thu Aug 21 06:44:36 EEST 2003
On Wednesday 20 August 2003 23:50, Havoc Pennington wrote:
> It doesn't copy. It doesn't affect CLIPBOARD at all. Just ignore the
> existence of PRIMARY entirely and you'll be fine.
[snip]
> Yes, there is only one clipboard.
Yes, I know it doesn't copy memory, it is volatile and an evil hack IMHO.
You are just playing semantics to call 'VOLATILE CLIPBOARD ONE' 'PRIMARY' and
to say it does not 'copy' and 'paste' text because it does not go via
'CLIPBOARD'. BTW no ill intent, but I think you need to take a step back from
the problem when you begin to nitpick that selections aren't a means for the
user to copy and paste text because select doesn't copy and it doesn't use
'CLIPBOARD'. Think about how you would explain selections to your mum or PHB,
I have a feeling you probably would not bother or you would end up explaining
the implementation just so they understand how to use it and understand that
when you close the app, the selection goes away (without more evil hacks upon
hacks).
When I said there should only be one clipboard, I mean there should only be
one of 'PRIMARY', 'SECONDARY' and 'CLIPBOARD'. 'SCONDARY' is already
deprecated, I am proposing a means to also deprecate 'PRIMARY' and design a
sensible unified system without evil hacks. As you said we need to write down
how it should work and make all apps match the spec, not each other. We can
still have behaviour like selections without 'PRIMARY' with what I am
proposing.
The *only* good reason for selections to go to 'PRIMARY' and not 'CLIPBOARD'
and to still even have 'PRIMARY' at all, is that selections would be
destructive of 'CLIPBOARD'. What I am proposing is 2 selections, one
non-destructive one of 'CLIPBOARD' with the left mouse button (as before),
and instead a middle button selection which *does* copy to the 'CLIPBOARD'.
This is button semetrical with middle button click being the 'paste' of
selections which seems more logical. Middle button drag to select, middle
click to drop. Middle button drag goes to 'CLIPBOARD'. Left button drag does
not destroy 'CLIPBOARD' (and could still go to 'PRIMARY' for transitional
compatibility if you like).
Okay so I'll describe this in more detail and extend my original proposal with
a possible transitional layer to get us to the final objective or deprecating
'PRIMARY':
Legacy Apps:
Left button select - highlight text and set selection as 'PRIMARY'
Middle click - copy 'PRIMARY' selection to app
cut/copy/paste - works with 'CLIPBOARD' as expected
and does whatever other random things it does
Transitional Freedesktop Spec Apps:
Left button select - highlight text and set selection as 'PRIMARY'
Middle button select - highlight text and copy to 'CLIPBOARD'
Middle click - paste 'CLIPBOARD' to app
cut/copy/paste - works with 'CLIPBOARD' as expected
lecagy paste option - copy 'PRIMARY' selection to app (app and context menu
options)
No compat Freedesktop Spec Apps:
Left button select - highlight text
Middle button select - highlight text and copy to 'CLIPBOARD'
Middle click - paste 'CLIPBOARD' to app
cut/copy/paste - works with 'CLIPBOARD' as expected
In the final spec there is no volatile primary clipboard anymore, it is now
deprecated. Left button select is non-destructive. User is not confused,
mouse buttons are used semetrically.
--
Regards
John
More information about the xdg
mailing list