Clipboard between applications

Ulrich Czekalla ulrich.czekalla at utoronto.ca
Tue Mar 18 08:55:17 CST 2003


On Mon, 2003-03-17 at 15:32, Ferenc Wagner wrote:
>                Hello!
> 
> I'm unable to move the contents of the clipboard between
> applications.  At the end you find an annotated
> --debugmsg +clipboard log (with a call for IsSelectionOwner
> inserted into CloseClipboard).
> 
> In short, the copying application can read the clipboard,
> but the other one can't.  Seems like the x11drv/clipboard.c
> data isn't shared between the threads.
> 

It's shared between threads but not between processes.

> Copying between two notepad.exe.so-s works, but through the
> X selection only (guess from the logs; the IsSelectionOwner
> status is 1 (ie. S_PRIMARY) during that process).
> 
> Is it a mis(configuration|understanding) on my side, or
> isn't this functionality implemented?
> 

Wine always uses X selections as the transport method for exchanging
data via the clipboard among two processes. Even between two wine apps.
There are some settings that can change the behaviour of the clipboard.
Checkout the clipboard section of your config file.

>                                 Thanks: Feri.
> 
> 
> ### Application startup:
> trace:clipboard:OpenClipboard ((nil))...
> trace:clipboard:OpenClipboard    returning 1
> trace:clipboard:EmptyClipboard ()
> trace:clipboard:GetOpenClipboardWindow ()
> trace:clipboard:X11DRV_AcquireClipboard Grabbed X selection, owner=(00000000)
> trace:clipboard:CloseClipboard ()
> trace:clipboard:X11DRV_IsSelectionOwner status: 3
> fixme:font:WineEngCreateFontInstance Untranslated charset 138
> ### Copy to selection:
> trace:clipboard:OpenClipboard (0x2007a)...
> trace:clipboard:OpenClipboard    returning 1
> trace:clipboard:EmptyClipboard ()
> trace:clipboard:GetOpenClipboardWindow ()
> trace:clipboard:SetClipboardData (0000000D, 0x403a2f4a) !
> trace:clipboard:GetOpenClipboardWindow ()
> trace:clipboard:SetClipboardData (00000001, 0x403a099a) !
> trace:clipboard:GetOpenClipboardWindow ()
> trace:clipboard:CloseClipboard ()
> trace:clipboard:X11DRV_IsSelectionOwner status: 3
> ### Paste selection (other application)
> trace:clipboard:OpenClipboard (0x20065)...
> trace:clipboard:OpenClipboard    returning 1
> trace:clipboard:X11DRV_IsSelectionOwner status: 0
> [...it fails...]

X11DRV_IsSelectionOwner should return false. After this check you should
see a request to the selection owner for a list of available formats.

> ### Paste selection (application that made to copy)
> trace:clipboard:OpenClipboard (0x2007a)...
> trace:clipboard:OpenClipboard    returning 1
> trace:clipboard:CLIPBOARD_EnumClipboardFormats Next available format 13
> trace:clipboard:IsClipboardFormatAvailable (000D)- ret(1)
> trace:clipboard:GetClipboardData (0000000D)
> trace:clipboard:CLIPBOARD_RenderText    UNICODETEXT -> UNICODETEXT
> trace:clipboard:CLIPBOARD_RenderFormat enter format=13
> trace:clipboard:X11DRV_IsSelectionOwner status: 3
> trace:clipboard:GetClipboardData        returning 0x4039ec92 (type 13)
> trace:clipboard:CloseClipboard ()
> trace:clipboard:X11DRV_IsSelectionOwner status: 3
> [...success...]
> 
> 




More information about the wine-devel mailing list