▲ | zvr 6 days ago | ||||||||||||||||
An important lesson to learn is the way X11 does copy/paste (hint: it doesn't). You select (typically via the mouse) something on the screen. The client (the software that handles this, e.g.terminal emulator, browser, office editing suite) declares ownership on a "selection". There are at least 3 of them: PRIMARY, SECONDARY, and CLIPBOARD. Nothing gets copied! When you go to some other client (or even the same) and do a "paste", a request is sent to the first client (the selection owner), "please give me the content". The second client gets the content and does whatever it wants with it, typically inserting it somewhere. Contrast this way of operation to what other systems (like Windows and Mac) do: the content is copied to a central place, and then copied out to be "pasted". If one wants this behavior in X11, one needs to run something like a "clipboard manager" which can trivially implement this. I must admit, when using Windows, instead of Ctrl-V for pasting, I have completely switched to Windows-V, which gives you at least a history of the copied content. Going further, on X11, the additional wonderful part is that there are also content-negotiation primitives built-in in this exchange! So it could be the case that you select some formatted text in your browser, you want to paste it in your text editor (e.g. gvim), the editor asks ("give me the content, in Markdown (or HTML) format") and this is what gets transferred and eventually inserted. Or, if you select an image, you can paste the SVG text that generated it. I have no idea what Wayland does, but this is another functionality that is extremely helpful and will be missed if not available, when/if X11 is replaced. | |||||||||||||||||
▲ | account42 6 days ago | parent | next [-] | ||||||||||||||||
> Contrast this way of operation to what other systems (like Windows and Mac) do: the content is copied to a central place, and then copied out to be "pasted". This is a gross oversimplification to how Windows manages the clipboard. In the general case, the situation is not much different from X11 and the data stays in the sending application until requested - and is lost on program exit. | |||||||||||||||||
| |||||||||||||||||
▲ | 0points 5 days ago | parent | prev [-] | ||||||||||||||||
A ordinary user would use the clipboard manager installed on their desktop and no part of your description would fit: * Copied text goes to the clipboard manager as it is selected * Clipboard manager populates the clipboard buffers as you configured it. For example send copied text to multiple buffers to simulate non-linux behavior. * User can query clipboard manager for the history whenever * User can paste anything from clipboard manager. Yes, even if the original app has closed. |