Clipboard between applications

Ferenc Wagner wferi at tba.elte.hu
Mon Mar 17 14:32:27 CST 2003


               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.

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?

                                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...]
### 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