Linked by Thom Holwerda on Fri 5th Nov 2010 19:15 UTC, submitted by Debjit
Ubuntu, Kubuntu, Xubuntu Finally. Finally the leader of a major distribution who has the guts to stand up and say what a lot of people have known for a long time, but didn't dare to say because it usually leads to a storm of criticism. Mark Shuttleworth has announced that Ubuntu will be moving away from, opting to go with Wayland instead.
Thread beginning with comment 448866
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[3]: ...
by anda_skoa on Sat 6th Nov 2010 12:04 UTC in reply to "RE[2]: ..."
Member since:

I believe there are 3 completely separate copy and paste systems running under Linux, and the one in X isn't even used by most people. They use the stuff that Gnome/KDE do instead. It would be nice to see all this consolidated into 1 Wayland system.

There is only one system in X as well, but it can be used on multiple channels.
Mouse select and middle mouse button paste, keyboard/menu based copy&paste and drag&drop are all working through the same mechanism, just on different "channels."

Toolkits like GTK+, Qt, Java/AWT implement that mechanism and usually do provide access to all such channels, but always at least main clipboard and D&D.

A clipboard or D&D operation in X does at first not include any data, the source application announces that it can provide data and in which formats it can provide it.
The target application (where the drop occurs or where paste is performed) then asks for the data in the format it likes best.

Example: source application is a browser, a portion of text with markup is selected. In a copy operation is could announce text as text/plain without any formatting, as well as text/html, but also as an ODT (if it has export to OpenDocument capabilities).

Depending on the target's capabilities, it in turn can now select one of these and then the actual data transfer happens.

This even allows to transport data in an application or toolkit specific format in case both apps are the same or use the same toolkit.
For example a Java application will always announce a MIME type equivalent of java.lang.String when pasting text, allowing a target Java app to just get the serialized String object.

Reply Parent Score: 5

RE[4]: ...
by bogomipz on Sat 6th Nov 2010 17:39 in reply to "RE[3]: ..."
bogomipz Member since:

The Windows clipboard system has a similar feature. When you copy something in say Excel, the program where the paste happens can choose which format it wants the data in; BIFF, XML, HTML, RTF, CSV, DIF, SYLK, Text, Bitmap, etc.

What I wonder is this: In Windows you can still paste after the source program has exited, while in X11 you can't. Does this mean the program does 20 times more work on Windows when you do a copy in a program supporting 20 clipboard formats? Does copying 60k rows in Excel take up 20 times more memory than it needs to?

(When I copy in Excel 2007, it puts 29 formats on the clipboard. Some of these have types such as "DataObject" or "OwnerLink", but nearly 20 are actual different data formats.)

Reply Parent Score: 2

RE[5]: ...
by bogomipz on Sat 6th Nov 2010 18:16 in reply to "RE[4]: ..."
bogomipz Member since:

God damn you OSnews!!! I spent quite a while writing a long edit note that got killed by the timeout! Now I have to write it again as a reply:

I have a tiny program that lists the formats on the clipboard, which was how I knew there were 29 entries. To partially answer my own question, all I had to do was close Excel, and then check the clipboard. It turns out only 5 formats remain; RTF and Text in 4 different encodings. Text seems to always come in the 4 encodings, so I guess this is a feature of the clipboard.

It also seems to depend on how I close Excel - cleanly or from the task manager. When I kill it, RTF is not there, but Text and some formats that are removed when Excel exits normally are. Pasting still works.

My guess is therefore that Text goes onto the clipboard right away, while the rest of the formats are on demand, but RTF data is added when Excel is exiting. Can anyone confirm this, or explain what is really going on?

EDIT: Copy/paste from Excel to Paint works while Excel is open, but not after it has closed.

Edited 2010-11-06 18:20 UTC

Reply Parent Score: 3