X11 Clipboard implementation

Ulrich Czekalla ulrich.czekalla at utoronto.ca
Wed Feb 12 09:47:32 CST 2003


On Wed, 2003-02-12 at 10:01, Mike Hearn wrote:
> > You may be able to hack some of the controls to support text selection
> > but you won't be able to do it for the general case. For example this
> > wouldn't work in Word. So I don't see this working. In fact it could
> > break assumption made by the application. In my opinion, the only way to
> > copy data from a Windows App to X is via control-c/Clipboard API. 
> 
> Yes, true
> 
> > In Windows, to copy data you generally need to select the data (Under X
> > this would grab the PRIMARY selection) and then hit control-c (Under X
> > this would grab the CLIPBOARD selection). 
> > 
> > In think we should always be grabbing both PRIMARY and CLIPBOARD and
> > releasing them when we loose either (ClearAllSelections=1). This seemed
> > to be the least confusing for many users as well. 
> 
> I don't agree with that, the X clipboard spec is very clear on this, and
> most apps are now in compliance. Mixing them together is what Qt used to
> do, and people found it very confusing when they couldn't figure out
> what was going on with the clipboard.
> 

I though you wouldn't ;) As you pointed out, if we can't use text
selection to pass data via PRIMARY (because Windows apps don't allow
this) then it follows that we should only use CLIPBOARD. But when I
select and copy text from Word, I want be able to paste it into my
xterm! I find this to be a common complaint.

I guess in Wine we have been simulating the selection of data into
PRIMARY by assuming that if you copied data into the clipboard you
probably selected it.

Your right thought, Wine apps may be somewhat unique but at the end of
the day its behaviour is non-standard. What does everyone else think?
This is one area that most people will have an opinion :)


> > I'm in the process of finishing a large clipboard patch for CodeWeavers
> > that should also address the dll separation issues. Hopefully I'll get
> > the patch together soon and post it to the list.
> 
> Cool :)
> 
> > -- 
> > Mike Hearn <m.hearn at signal.qinetiq.com>
> > QinetiQ - Malvern Technology Center
-- 
Ulrich Czekalla <ulrich.czekalla at utoronto.ca>
-- 
Ulrich Czekalla <ulrich.czekalla at utoronto.ca>




More information about the wine-devel mailing list