Xpra: Ticket #834: Sync issue with win32 client clipboard

With 0.14.20 win32 client against 0.14.20 fedora 21 server, after copying and pasting an image, copying and pasting from a browser address bar becomes out of sync (rather than pasting the copied contents from the address bar, the previous clipboard content image is pasted again).

Discovered this with a mostly generic webkit browser. It's reproducible with a gmail.com tab, but I haven't had time to test more extensively.

Using the gtk_view_clipboard.py app server-side, I notice that the primary clipboard contents are not updated when copying the images (presumably because the image is never highlit?). After subsequently copying text from the address bar, the Clipboard Test Tool indicates that the newly copied content has updated both clipboard and primary ...

... as usual, anything clipboard related is convoluted as can be. I'll double-check osx when I get a chance... and also perhaps check some of your builds... but, in the meantime, would you like me to run with -d clipboard client or server side as well?(or both).



Fri, 10 Apr 2015 02:34:00 GMT - Antoine Martin: owner changed; milestone set

Both please, preferably annotated.


Sat, 11 Apr 2015 00:21:14 GMT - alas:

Well, here I was thinking I'd gotten past the clipboard testing related PTSD... silly me.

Testing with our 0.14.22 (latest 0.14.x) client & server builds seems to indicate they behave like the 0.14.20 and, unfortunately, like the 0.15.0.

Even more unfortunately, while both are misbehaving, the win32 is misbehaving differently than the OSX. And firefox seems to be misbehaving differently than our generic webkit browser. The problems seem to be limited to applications/windows that support display of images pasted from clipboard, rather than those that display them as link addresses, or not at all (wasn't able to repro on any form comment fields on other sites, nor in gedit which doesn't accept images pasted in-line, not to mention by trying to paste images into search bars on sites like cnn.com).

The horror.

So, I will attach:

I suppose one or the other clients should be tackled first, and I have more windows logs handy... but can certainly gather up more as needed.

The basic script of tests:

Needless to say... this made for a long day.


Sat, 11 Apr 2015 00:23:13 GMT - alas: attachment set

0.14.22 r8975 win32 client logs (-d clipboard) v. 0.14.22 r8975 fedora20 server, testing clipboard with firefox


Sat, 11 Apr 2015 00:24:27 GMT - alas: attachment set

0.14.22 r8975 fedora 20 server (-d clipboard) v. 0.14.22 r8975 win32 client, clipboard tests with firefox


Sat, 11 Apr 2015 00:26:38 GMT - alas: attachment set

0.14.22 r8975 osx client (-d clipboard) v. 0.14.22 r8975 fedora 20 server, testing clipboard with firefox


Sat, 11 Apr 2015 00:27:59 GMT - alas: attachment set

0.14.22 r8975 fedora20 server (-d clipboard) v. 0.14.22 r8975 osx client, testing clipboard with firefox


Sat, 11 Apr 2015 00:32:39 GMT - alas: attachment set

0.14.20 win32 client v. 0.14.20 fedora 21 server (-d clipboard both sides), testing clipboard with generic webkit browser


Sat, 11 Apr 2015 07:58:00 GMT - Antoine Martin: attachment set

pasting image and its url works for me


Sat, 11 Apr 2015 07:58:12 GMT - Antoine Martin:

I cannot reproduce. Maybe I am not following the instructions properly.

Here's what I did, Fedora 21 server, win XP client. Trying to include as much detail as I can:

Screenshot of the result in tab1: pasting image and its url works for me

Clarifications:


Tue, 14 Apr 2015 01:20:03 GMT - alas: attachment set

copy from local desktop, pastes in as 'G'


Tue, 14 Apr 2015 01:30:51 GMT - alas:

Sorry, I meant to make the annotations clear, but I think the detail got past me by the end of the testing. "server-side" is what is happening in the xpra session, "client-side" is what is happening on local desktop outside xpra session.

As you seem to have guessed, I was trying to include information about what a server-side gtk_view_clipboard.py process indicated was on the various server-side clipboards. (I do recall that primary and secondary don't exist on osx & win32, but I seem to recall cross/mis syncronization having been an issue at one point, so I do like to check.) So, the contents inside parenthesis are those contents: clipboard, primary, secondary. The contents seemed to me to behaving basically as expected... which made the pasting result of G all the more confounding, as it didn't coincide with the clipboard contents (see example below).

Before clarifying steps, I decided to double-check with some of your builds... but I am seeing the same behavior (0.14.22 r8973 win32 client v. 0.14.22 r8980 fedora 20 server). The logs below are from your builds.

So, double checking your steps, I find that what's missing is an attempt to copy something client-side (from a Notepad application, for instance) and then paste it into the server-side (xpra-session) application.

In my case, I went back and copied a line of notes from my previous tests: 12:39 copy lawn gnome ('','','') paste -> image

Screenshot of result after pasting into tab 1: copy from local desktop, pastes in as 'G'


As you can see... rather than the notes, the character 'G' is all that is pasted.

Just in case it saves a minute, here's the client-side -d client log I got when producing that screenshot:

2015-04-13 18:08:03,548 do_selection_clear_event(<gtk.gdk.Event at 035298D8: GDK_SELECTION_CLEAR selection=CLIPBOARD, target=<none>, property=<none>>) have_token=Tru
e, block_owner_change=False selection=CLIPBOARD
2015-04-13 18:08:03,548 send clipboard token: CLIPBOARD
2015-04-13 18:08:03,548 local_to_remote(CLIPBOARD) local_clipboard=CLIPBOARD, remote_clipboard=CLIPBOARD
2015-04-13 18:08:03,548 do_owner_changed((<gtk.Clipboard object at 0x25731c0 (GtkClipboard at 0x6c7118)>, <gtk.gdk.Event at 035298D8: GDK_OWNER_CHANGE reason=GDK_OWN
ER_CHANGE_NEW_OWNER, selection=CLIPBOARD>)) greedy_client=False, block_owner_change=True
2015-04-13 18:08:03,548 remove_block(())
2015-04-13 18:08:08,874 process_clipboard_packet(['clipboard-pending-requests', 1]) level=1
2015-04-13 18:08:08,874 process clipboard packet type=clipboard-pending-requests
2015-04-13 18:08:08,874 process_clipboard_packet(['clipboard-request', 25, 'CLIPBOARD', 'TARGETS']) level=1
2015-04-13 18:08:08,874 clipboard_progress(None, 1)
2015-04-13 18:08:08,874 clipboard_notify(1)
2015-04-13 18:08:08,874 process clipboard packet type=clipboard-request
2015-04-13 18:08:08,874 remote_to_local(CLIPBOARD) local_clipboard=CLIPBOARD, remote_clipboard=CLIPBOARD
2015-04-13 18:08:08,874 process clipboard request, request_id=25, selection=CLIPBOARD, local name=CLIPBOARD, target=TARGETS
2015-04-13 18:08:08,874 get_contents(TARGETS,<function got_contents at 0x025A1530>) selection=CLIPBOARD
2015-04-13 18:08:08,874 got_targets(<gtk.Clipboard object at 0x25731c0 (GtkClipboard at 0x6c7118)>, ('UTF8_STRING',), (None,))
2015-04-13 18:08:08,874 got_contents(ATOM, 32, <type 'tuple'>:1) data=0x2827555446385f535452494e47272c29..
2015-04-13 18:08:08,874 _filter_targets(('UTF8_STRING',))=['UTF8_STRING']
2015-04-13 18:08:08,874 clipboard raw -> wire: ('ATOM', 32, ('UTF8_STRING',)) -> ('atoms', ['UTF8_STRING'])
2015-04-13 18:08:08,888 process_clipboard_packet(['clipboard-pending-requests', 0]) level=1
2015-04-13 18:08:08,888 process clipboard packet type=clipboard-pending-requests
2015-04-13 18:08:08,888 process_clipboard_packet(['clipboard-pending-requests', 1]) level=1
2015-04-13 18:08:08,888 clipboard_progress(None, 0)
2015-04-13 18:08:08,888 process_clipboard_packet(['clipboard-request', 26, 'CLIPBOARD', 'TARGETS']) level=1
2015-04-13 18:08:08,888 clipboard_notify(0)
2015-04-13 18:08:08,888 process clipboard packet type=clipboard-pending-requests
2015-04-13 18:08:08,888 clipboard_progress(None, 1)
2015-04-13 18:08:08,888 clipboard_notify(1)
2015-04-13 18:08:08,888 process clipboard packet type=clipboard-request
2015-04-13 18:08:08,888 remote_to_local(CLIPBOARD) local_clipboard=CLIPBOARD, remote_clipboard=CLIPBOARD
2015-04-13 18:08:08,888 process clipboard request, request_id=26, selection=CLIPBOARD, local name=CLIPBOARD, target=TARGETS
2015-04-13 18:08:08,888 get_contents(TARGETS,<function got_contents at 0x025A16F0>) selection=CLIPBOARD
2015-04-13 18:08:08,888 got_targets(<gtk.Clipboard object at 0x25731c0 (GtkClipboard at 0x6c7118)>, ('UTF8_STRING',), (None,))
2015-04-13 18:08:08,888 got_contents(ATOM, 32, <type 'tuple'>:1) data=0x2827555446385f535452494e47272c29..
2015-04-13 18:08:08,888 _filter_targets(('UTF8_STRING',))=['UTF8_STRING']
2015-04-13 18:08:08,888 clipboard raw -> wire: ('ATOM', 32, ('UTF8_STRING',)) -> ('atoms', ['UTF8_STRING'])
2015-04-13 18:08:08,904 process_clipboard_packet(['clipboard-pending-requests', 0]) level=1
2015-04-13 18:08:08,904 process_clipboard_packet(['clipboard-pending-requests', 1]) level=1
2015-04-13 18:08:08,904 process clipboard packet type=clipboard-pending-requests
2015-04-13 18:08:08,904 process_clipboard_packet(['clipboard-request', 27, 'CLIPBOARD', 'TARGETS']) level=1
2015-04-13 18:08:08,904 clipboard_progress(None, 0)
2015-04-13 18:08:08,904 clipboard_notify(0)
2015-04-13 18:08:08,904 process clipboard packet type=clipboard-pending-requests
2015-04-13 18:08:08,904 clipboard_progress(None, 1)
2015-04-13 18:08:08,904 clipboard_notify(1)
2015-04-13 18:08:08,904 process clipboard packet type=clipboard-request
2015-04-13 18:08:08,904 remote_to_local(CLIPBOARD) local_clipboard=CLIPBOARD, remote_clipboard=CLIPBOARD
2015-04-13 18:08:08,904 process clipboard request, request_id=27, selection=CLIPBOARD, local name=CLIPBOARD, target=TARGETS
2015-04-13 18:08:08,904 get_contents(TARGETS,<function got_contents at 0x025A16F0>) selection=CLIPBOARD
2015-04-13 18:08:08,904 got_targets(<gtk.Clipboard object at 0x25731c0 (GtkClipboard at 0x6c7118)>, ('UTF8_STRING',), (None,))
2015-04-13 18:08:08,904 got_contents(ATOM, 32, <type 'tuple'>:1) data=0x2827555446385f535452494e47272c29..
2015-04-13 18:08:08,904 _filter_targets(('UTF8_STRING',))=['UTF8_STRING']
2015-04-13 18:08:08,904 clipboard raw -> wire: ('ATOM', 32, ('UTF8_STRING',)) -> ('atoms', ['UTF8_STRING'])
2015-04-13 18:08:08,921 process_clipboard_packet(['clipboard-pending-requests', 0]) level=1
2015-04-13 18:08:08,921 process clipboard packet type=clipboard-pending-requests
2015-04-13 18:08:08,921 clipboard_progress(None, 0)
2015-04-13 18:08:08,921 clipboard_notify(0)
2015-04-13 18:08:08,921 process_clipboard_packet(['clipboard-pending-requests', 1]) level=1
2015-04-13 18:08:08,921 process_clipboard_packet(['clipboard-request', 28, 'CLIPBOARD', 'TARGETS']) level=1
2015-04-13 18:08:08,921 process clipboard packet type=clipboard-pending-requests
2015-04-13 18:08:08,921 clipboard_progress(None, 1)
2015-04-13 18:08:08,921 clipboard_notify(1)
2015-04-13 18:08:08,921 process clipboard packet type=clipboard-request
2015-04-13 18:08:08,921 remote_to_local(CLIPBOARD) local_clipboard=CLIPBOARD, remote_clipboard=CLIPBOARD
2015-04-13 18:08:08,921 process clipboard request, request_id=28, selection=CLIPBOARD, local name=CLIPBOARD, target=TARGETS
2015-04-13 18:08:08,921 get_contents(TARGETS,<function got_contents at 0x025A16F0>) selection=CLIPBOARD
2015-04-13 18:08:08,921 got_targets(<gtk.Clipboard object at 0x25731c0 (GtkClipboard at 0x6c7118)>, ('UTF8_STRING',), (None,))
2015-04-13 18:08:08,921 got_contents(ATOM, 32, <type 'tuple'>:1) data=0x2827555446385f535452494e47272c29..
2015-04-13 18:08:08,921 _filter_targets(('UTF8_STRING',))=['UTF8_STRING']
2015-04-13 18:08:08,921 clipboard raw -> wire: ('ATOM', 32, ('UTF8_STRING',)) -> ('atoms', ['UTF8_STRING'])
2015-04-13 18:08:08,936 process_clipboard_packet(['clipboard-pending-requests', 0]) level=1
2015-04-13 18:08:08,936 process clipboard packet type=clipboard-pending-requests
2015-04-13 18:08:08,936 clipboard_progress(None, 0)
2015-04-13 18:08:08,936 clipboard_notify(0)
2015-04-13 18:08:08,936 process_clipboard_packet(['clipboard-pending-requests', 1]) level=1
2015-04-13 18:08:08,936 process_clipboard_packet(['clipboard-request', 29, 'CLIPBOARD', 'TARGETS']) level=1
2015-04-13 18:08:08,936 process clipboard packet type=clipboard-pending-requests
2015-04-13 18:08:08,936 clipboard_progress(None, 1)
2015-04-13 18:08:08,936 clipboard_notify(1)
2015-04-13 18:08:08,936 process clipboard packet type=clipboard-request
2015-04-13 18:08:08,936 remote_to_local(CLIPBOARD) local_clipboard=CLIPBOARD, remote_clipboard=CLIPBOARD
2015-04-13 18:08:08,936 process clipboard request, request_id=29, selection=CLIPBOARD, local name=CLIPBOARD, target=TARGETS
2015-04-13 18:08:08,936 get_contents(TARGETS,<function got_contents at 0x025A16F0>) selection=CLIPBOARD
2015-04-13 18:08:08,936 got_targets(<gtk.Clipboard object at 0x25731c0 (GtkClipboard at 0x6c7118)>, ('UTF8_STRING',), (None,))
2015-04-13 18:08:08,936 got_contents(ATOM, 32, <type 'tuple'>:1) data=0x2827555446385f535452494e47272c29..
2015-04-13 18:08:08,936 _filter_targets(('UTF8_STRING',))=['UTF8_STRING']
2015-04-13 18:08:08,936 clipboard raw -> wire: ('ATOM', 32, ('UTF8_STRING',)) -> ('atoms', ['UTF8_STRING'])
2015-04-13 18:08:08,951 process_clipboard_packet(['clipboard-pending-requests', 0]) level=1
2015-04-13 18:08:08,951 process clipboard packet type=clipboard-pending-requests
2015-04-13 18:08:08,951 clipboard_progress(None, 0)
2015-04-13 18:08:08,951 clipboard_notify(0)
2015-04-13 18:08:08,951 process_clipboard_packet(['clipboard-pending-requests', 1]) level=1
2015-04-13 18:08:08,951 process_clipboard_packet(['clipboard-request', 30, 'CLIPBOARD', 'TARGETS']) level=1
2015-04-13 18:08:08,951 process clipboard packet type=clipboard-pending-requests
2015-04-13 18:08:08,951 clipboard_progress(None, 1)
2015-04-13 18:08:08,951 clipboard_notify(1)
2015-04-13 18:08:08,951 process clipboard packet type=clipboard-request
2015-04-13 18:08:08,951 remote_to_local(CLIPBOARD) local_clipboard=CLIPBOARD, remote_clipboard=CLIPBOARD
2015-04-13 18:08:08,951 process clipboard request, request_id=30, selection=CLIPBOARD, local name=CLIPBOARD, target=TARGETS
2015-04-13 18:08:08,951 get_contents(TARGETS,<function got_contents at 0x025A1530>) selection=CLIPBOARD
2015-04-13 18:08:08,951 got_targets(<gtk.Clipboard object at 0x25731c0 (GtkClipboard at 0x6c7118)>, ('UTF8_STRING',), (None,))
2015-04-13 18:08:08,951 got_contents(ATOM, 32, <type 'tuple'>:1) data=0x2827555446385f535452494e47272c29..
2015-04-13 18:08:08,951 _filter_targets(('UTF8_STRING',))=['UTF8_STRING']
2015-04-13 18:08:08,951 clipboard raw -> wire: ('ATOM', 32, ('UTF8_STRING',)) -> ('atoms', ['UTF8_STRING'])
2015-04-13 18:08:08,951 process_clipboard_packet(['clipboard-pending-requests', 0]) level=1
2015-04-13 18:08:08,951 process clipboard packet type=clipboard-pending-requests
2015-04-13 18:08:08,967 clipboard_progress(None, 0)
2015-04-13 18:08:08,967 clipboard_notify(0)
2015-04-13 18:08:08,967 process_clipboard_packet(['clipboard-pending-requests', 1]) level=1
2015-04-13 18:08:08,967 process clipboard packet type=clipboard-pending-requests
2015-04-13 18:08:08,967 process_clipboard_packet(['clipboard-request', 31, 'CLIPBOARD', 'TARGETS']) level=1
2015-04-13 18:08:08,967 clipboard_progress(None, 1)
2015-04-13 18:08:08,967 clipboard_notify(1)
2015-04-13 18:08:08,967 process clipboard packet type=clipboard-request
2015-04-13 18:08:08,967 remote_to_local(CLIPBOARD) local_clipboard=CLIPBOARD, remote_clipboard=CLIPBOARD
2015-04-13 18:08:08,967 process clipboard request, request_id=31, selection=CLIPBOARD, local name=CLIPBOARD, target=TARGETS
2015-04-13 18:08:08,967 get_contents(TARGETS,<function got_contents at 0x025A1230>) selection=CLIPBOARD
2015-04-13 18:08:08,967 got_targets(<gtk.Clipboard object at 0x25731c0 (GtkClipboard at 0x6c7118)>, ('UTF8_STRING',), (None,))
2015-04-13 18:08:08,967 got_contents(ATOM, 32, <type 'tuple'>:1) data=0x2827555446385f535452494e47272c29..
2015-04-13 18:08:08,967 _filter_targets(('UTF8_STRING',))=['UTF8_STRING']
2015-04-13 18:08:08,967 clipboard raw -> wire: ('ATOM', 32, ('UTF8_STRING',)) -> ('atoms', ['UTF8_STRING'])
2015-04-13 18:08:08,967 process_clipboard_packet(['clipboard-pending-requests', 0]) level=1
2015-04-13 18:08:08,967 process clipboard packet type=clipboard-pending-requests
2015-04-13 18:08:08,983 clipboard_progress(None, 0)
2015-04-13 18:08:08,983 clipboard_notify(0)
2015-04-13 18:08:08,983 process_clipboard_packet(['clipboard-pending-requests', 1]) level=1
2015-04-13 18:08:08,983 process_clipboard_packet(['clipboard-request', 32, 'CLIPBOARD', 'application/x-moz-nativehtml']) level=1
2015-04-13 18:08:08,983 process clipboard packet type=clipboard-pending-requests
2015-04-13 18:08:08,983 clipboard_progress(None, 1)
2015-04-13 18:08:08,983 clipboard_notify(1)
2015-04-13 18:08:08,983 process clipboard packet type=clipboard-request
2015-04-13 18:08:08,983 remote_to_local(CLIPBOARD) local_clipboard=CLIPBOARD, remote_clipboard=CLIPBOARD
2015-04-13 18:08:08,983 process clipboard request, request_id=32, selection=CLIPBOARD, local name=CLIPBOARD, target=application/x-moz-nativehtml
2015-04-13 18:08:08,983 get_contents(application/x-moz-nativehtml,<function got_contents at 0x025A1570>) selection=CLIPBOARD
2015-04-13 18:08:08,983 unpack <gtk.Clipboard object at 0x25731c0 (GtkClipboard at 0x6c7118)>: <type 'gtk.SelectionData'>
2015-04-13 18:08:08,983 unpack: <GtkSelectionData at 0x5d011a0>
2015-04-13 18:08:08,983 unpack(..) type=ATOM, format=32, data=<type 'str'>:4
2015-04-13 18:08:08,983 got_contents(ATOM, 32, <type 'str'>:4) data=0x65c00000..
2015-04-13 18:08:08,983 _do_munge_raw_selection_to_wire(application/x-moz-nativehtml, ATOM, 32, <type 'str'>:4:['e', '\xc0', '\x00', '\x00']) using gdk atom code
2015-04-13 18:08:08,983 _do_munge_raw_selection_to_wire(application/x-moz-nativehtml, ATOM, 32, <type 'str'>:4) atoms=[<GdkAtom 0xc065 = 'UTF8_STRING'>]
2015-04-13 18:08:08,983 _do_munge_raw_selection_to_wire(application/x-moz-nativehtml, ATOM, 32, <type 'str'>:4) atom_names=['UTF8_STRING']
2015-04-13 18:08:08,983 clipboard raw -> wire: ('ATOM', 32, 'e\xc0\x00\x00') -> ('atoms', ['UTF8_STRING'])
2015-04-13 18:08:08,999 process_clipboard_packet(['clipboard-pending-requests', 0]) level=1
2015-04-13 18:08:08,999 process clipboard packet type=clipboard-pending-requests
2015-04-13 18:08:08,999 clipboard_progress(None, 0)
2015-04-13 18:08:08,999 clipboard_notify(0)
2015-04-13 18:08:53,581 do_owner_changed((<gtk.Clipboard object at 0x25731c0 (GtkClipboard at 0x6c7118)>, <gtk.gdk.Event at 03529EF0: GDK_OWNER_CHANGE reason=GDK_OWN
ER_CHANGE_NEW_OWNER, selection=CLIPBOARD>)) greedy_client=False, block_owner_change=False

And the server-side:

2015-04-13 18:08:08,798 process clipboard packet type=clipboard-token
2015-04-13 18:08:08,798 process clipboard token selection=CLIPBOARD, local clipboard name=CLIPBOARD, proxy=ClipboardProxy(CLIPBOARD)
2015-04-13 18:08:08,799 got token, selection=CLIPBOARD, targets=None, target_data=None
2015-04-13 18:08:08,799 do_owner_changed((<gtk.Clipboard object at 0x1654cd0 (GtkClipboard at 0x16bdac0)>, <gtk.gdk.Event at 0x128e940: GDK_OWNER_CHANGE reason=GDK_OWNER_CHANGE_NEW_OWNER, selection=CLIPBOARD>)) greedy_client=True, block_owner_change=True
2015-04-13 18:08:08,799 remove_block(())
2015-04-13 18:08:14,113 do_selection_request_event(<gtk.gdk.Event at 0x128e918: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=TARGETS, property=GDK_SELECTION>)
2015-04-13 18:08:14,114 target for CLIPBOARD: 'TARGETS'
2015-04-13 18:08:14,114 do_selection_request_event(<gtk.gdk.Event at 0x128e918: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=TARGETS, property=GDK_SELECTION>) target=TARGETS, selection=CLIPBOARD
2015-04-13 18:08:14,114 do_selection_get(<GtkSelectionData at 0x7ffcbd5b3540>, 0, 1472824314) selection=CLIPBOARD
2015-04-13 18:08:14,114 get clipboard from remote handler id=25
2015-04-13 18:08:14,125 process clipboard packet type=clipboard-contents
2015-04-13 18:08:14,125 process clipboard contents, selection=CLIPBOARD, type=ATOM, format=32
2015-04-13 18:08:14,125 _munge_wire_selection_to_raw(atoms, ATOM, 32, <type 'tuple'>:1:['UTF8_STRING'])
2015-04-13 18:08:14,125 _munge_wire_selection_to_raw(atoms, ATOM, 32, <type 'tuple'>:1)=[<GdkAtom 0x47 = 'UTF8_STRING'>]=[71L]=['G', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00']
2015-04-13 18:08:14,125 clipboard wire -> raw: ('ATOM', 32, 'atoms', ('UTF8_STRING',)) -> 'G\x00\x00\x00\x00\x00\x00\x00'
2015-04-13 18:08:14,126 got clipboard contents for id=25 len=8, loop=<xpra.gtk_common.nested_main.NestedMainLoop object at 0x1ad2d10> (type=ATOM, format=32)
2015-04-13 18:08:14,126 get clipboard from remote result(25)={'data': 'G\x00\x00\x00\x00\x00\x00\x00', 'type': 'ATOM', 'format': 32}
2015-04-13 18:08:14,126 do_selection_get(<GtkSelectionData at 0x7ffcbd5b3540>,0,1472824314) calling selection_data.set(ATOM, 32, <type 'str'>:8)
2015-04-13 18:08:14,127 do_selection_request_event(<gtk.gdk.Event at 0x128e918: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=TARGETS, property=GDK_SELECTION>)
2015-04-13 18:08:14,127 target for CLIPBOARD: 'TARGETS'
2015-04-13 18:08:14,128 do_selection_request_event(<gtk.gdk.Event at 0x128e918: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=TARGETS, property=GDK_SELECTION>) target=TARGETS, selection=CLIPBOARD
2015-04-13 18:08:14,128 do_selection_get(<GtkSelectionData at 0x7ffcbd5b3540>, 0, 1472824314) selection=CLIPBOARD
2015-04-13 18:08:14,128 get clipboard from remote handler id=26
2015-04-13 18:08:14,140 process clipboard packet type=clipboard-contents
2015-04-13 18:08:14,140 process clipboard contents, selection=CLIPBOARD, type=ATOM, format=32
2015-04-13 18:08:14,140 _munge_wire_selection_to_raw(atoms, ATOM, 32, <type 'tuple'>:1:['UTF8_STRING'])
2015-04-13 18:08:14,140 _munge_wire_selection_to_raw(atoms, ATOM, 32, <type 'tuple'>:1)=[<GdkAtom 0x47 = 'UTF8_STRING'>]=[71L]=['G', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00']
2015-04-13 18:08:14,140 clipboard wire -> raw: ('ATOM', 32, 'atoms', ('UTF8_STRING',)) -> 'G\x00\x00\x00\x00\x00\x00\x00'
2015-04-13 18:08:14,141 got clipboard contents for id=26 len=8, loop=<xpra.gtk_common.nested_main.NestedMainLoop object at 0x1ad2d10> (type=ATOM, format=32)
2015-04-13 18:08:14,141 get clipboard from remote result(26)={'data': 'G\x00\x00\x00\x00\x00\x00\x00', 'type': 'ATOM', 'format': 32}
2015-04-13 18:08:14,142 do_selection_get(<GtkSelectionData at 0x7ffcbd5b3540>,0,1472824314) calling selection_data.set(ATOM, 32, <type 'str'>:8)
2015-04-13 18:08:14,142 do_selection_request_event(<gtk.gdk.Event at 0x128e918: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=TARGETS, property=GDK_SELECTION>)
2015-04-13 18:08:14,142 target for CLIPBOARD: 'TARGETS'
2015-04-13 18:08:14,143 do_selection_request_event(<gtk.gdk.Event at 0x128e918: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=TARGETS, property=GDK_SELECTION>) target=TARGETS, selection=CLIPBOARD
2015-04-13 18:08:14,143 do_selection_get(<GtkSelectionData at 0x7ffcbd5b3540>, 0, 1472824314) selection=CLIPBOARD
2015-04-13 18:08:14,144 get clipboard from remote handler id=27
2015-04-13 18:08:14,158 process clipboard packet type=clipboard-contents
2015-04-13 18:08:14,158 process clipboard contents, selection=CLIPBOARD, type=ATOM, format=32
2015-04-13 18:08:14,158 _munge_wire_selection_to_raw(atoms, ATOM, 32, <type 'tuple'>:1:['UTF8_STRING'])
2015-04-13 18:08:14,158 _munge_wire_selection_to_raw(atoms, ATOM, 32, <type 'tuple'>:1)=[<GdkAtom 0x47 = 'UTF8_STRING'>]=[71L]=['G', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00']
2015-04-13 18:08:14,158 clipboard wire -> raw: ('ATOM', 32, 'atoms', ('UTF8_STRING',)) -> 'G\x00\x00\x00\x00\x00\x00\x00'
2015-04-13 18:08:14,159 got clipboard contents for id=27 len=8, loop=<xpra.gtk_common.nested_main.NestedMainLoop object at 0x1ad2d10> (type=ATOM, format=32)
2015-04-13 18:08:14,159 get clipboard from remote result(27)={'data': 'G\x00\x00\x00\x00\x00\x00\x00', 'type': 'ATOM', 'format': 32}
2015-04-13 18:08:14,159 do_selection_get(<GtkSelectionData at 0x7ffcbd5b3540>,0,1472824314) calling selection_data.set(ATOM, 32, <type 'str'>:8)
2015-04-13 18:08:14,160 do_selection_request_event(<gtk.gdk.Event at 0x128e918: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=TARGETS, property=GDK_SELECTION>)
2015-04-13 18:08:14,161 target for CLIPBOARD: 'TARGETS'
2015-04-13 18:08:14,161 do_selection_request_event(<gtk.gdk.Event at 0x128e918: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=TARGETS, property=GDK_SELECTION>) target=TARGETS, selection=CLIPBOARD
2015-04-13 18:08:14,161 do_selection_get(<GtkSelectionData at 0x7ffcbd5b3540>, 0, 1472824314) selection=CLIPBOARD
2015-04-13 18:08:14,162 get clipboard from remote handler id=28
2015-04-13 18:08:14,172 process clipboard packet type=clipboard-contents
2015-04-13 18:08:14,172 process clipboard contents, selection=CLIPBOARD, type=ATOM, format=32
2015-04-13 18:08:14,172 _munge_wire_selection_to_raw(atoms, ATOM, 32, <type 'tuple'>:1:['UTF8_STRING'])
2015-04-13 18:08:14,172 _munge_wire_selection_to_raw(atoms, ATOM, 32, <type 'tuple'>:1)=[<GdkAtom 0x47 = 'UTF8_STRING'>]=[71L]=['G', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00']
2015-04-13 18:08:14,173 clipboard wire -> raw: ('ATOM', 32, 'atoms', ('UTF8_STRING',)) -> 'G\x00\x00\x00\x00\x00\x00\x00'
2015-04-13 18:08:14,173 got clipboard contents for id=28 len=8, loop=<xpra.gtk_common.nested_main.NestedMainLoop object at 0x1ad2d10> (type=ATOM, format=32)
2015-04-13 18:08:14,173 get clipboard from remote result(28)={'data': 'G\x00\x00\x00\x00\x00\x00\x00', 'type': 'ATOM', 'format': 32}
2015-04-13 18:08:14,174 do_selection_get(<GtkSelectionData at 0x7ffcbd5b3540>,0,1472824314) calling selection_data.set(ATOM, 32, <type 'str'>:8)
2015-04-13 18:08:14,175 do_selection_request_event(<gtk.gdk.Event at 0x128e918: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=TARGETS, property=GDK_SELECTION>)
2015-04-13 18:08:14,175 target for CLIPBOARD: 'TARGETS'
2015-04-13 18:08:14,175 do_selection_request_event(<gtk.gdk.Event at 0x128e918: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=TARGETS, property=GDK_SELECTION>) target=TARGETS, selection=CLIPBOARD
2015-04-13 18:08:14,176 do_selection_get(<GtkSelectionData at 0x7ffcbd5b3540>, 0, 1472824314) selection=CLIPBOARD
2015-04-13 18:08:14,176 get clipboard from remote handler id=29
2015-04-13 18:08:14,185 process clipboard packet type=clipboard-contents
2015-04-13 18:08:14,185 process clipboard contents, selection=CLIPBOARD, type=ATOM, format=32
2015-04-13 18:08:14,185 _munge_wire_selection_to_raw(atoms, ATOM, 32, <type 'tuple'>:1:['UTF8_STRING'])
2015-04-13 18:08:14,186 _munge_wire_selection_to_raw(atoms, ATOM, 32, <type 'tuple'>:1)=[<GdkAtom 0x47 = 'UTF8_STRING'>]=[71L]=['G', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00']
2015-04-13 18:08:14,186 clipboard wire -> raw: ('ATOM', 32, 'atoms', ('UTF8_STRING',)) -> 'G\x00\x00\x00\x00\x00\x00\x00'
2015-04-13 18:08:14,186 got clipboard contents for id=29 len=8, loop=<xpra.gtk_common.nested_main.NestedMainLoop object at 0x1ad2d10> (type=ATOM, format=32)
2015-04-13 18:08:14,187 get clipboard from remote result(29)={'data': 'G\x00\x00\x00\x00\x00\x00\x00', 'type': 'ATOM', 'format': 32}
2015-04-13 18:08:14,187 do_selection_get(<GtkSelectionData at 0x7ffcbd5b3540>,0,1472824314) calling selection_data.set(ATOM, 32, <type 'str'>:8)
2015-04-13 18:08:14,188 do_selection_request_event(<gtk.gdk.Event at 0x128e918: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=TARGETS, property=GDK_SELECTION>)
2015-04-13 18:08:14,188 target for CLIPBOARD: 'TARGETS'
2015-04-13 18:08:14,189 do_selection_request_event(<gtk.gdk.Event at 0x128e918: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=TARGETS, property=GDK_SELECTION>) target=TARGETS, selection=CLIPBOARD
2015-04-13 18:08:14,189 do_selection_get(<GtkSelectionData at 0x7ffcbd5b3540>, 0, 1472824314) selection=CLIPBOARD
2015-04-13 18:08:14,189 get clipboard from remote handler id=30
2015-04-13 18:08:14,199 process clipboard packet type=clipboard-contents
2015-04-13 18:08:14,200 process clipboard contents, selection=CLIPBOARD, type=ATOM, format=32
2015-04-13 18:08:14,200 _munge_wire_selection_to_raw(atoms, ATOM, 32, <type 'tuple'>:1:['UTF8_STRING'])
2015-04-13 18:08:14,200 _munge_wire_selection_to_raw(atoms, ATOM, 32, <type 'tuple'>:1)=[<GdkAtom 0x47 = 'UTF8_STRING'>]=[71L]=['G', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00']
2015-04-13 18:08:14,201 clipboard wire -> raw: ('ATOM', 32, 'atoms', ('UTF8_STRING',)) -> 'G\x00\x00\x00\x00\x00\x00\x00'
2015-04-13 18:08:14,201 got clipboard contents for id=30 len=8, loop=<xpra.gtk_common.nested_main.NestedMainLoop object at 0x1ad2d10> (type=ATOM, format=32)
2015-04-13 18:08:14,201 get clipboard from remote result(30)={'data': 'G\x00\x00\x00\x00\x00\x00\x00', 'type': 'ATOM', 'format': 32}
2015-04-13 18:08:14,202 do_selection_get(<GtkSelectionData at 0x7ffcbd5b3540>,0,1472824314) calling selection_data.set(ATOM, 32, <type 'str'>:8)
2015-04-13 18:08:14,204 do_selection_request_event(<gtk.gdk.Event at 0x128e918: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=TARGETS, property=GDK_SELECTION>)
2015-04-13 18:08:14,204 target for CLIPBOARD: 'TARGETS'
2015-04-13 18:08:14,205 do_selection_request_event(<gtk.gdk.Event at 0x128e918: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=TARGETS, property=GDK_SELECTION>) target=TARGETS, selection=CLIPBOARD
2015-04-13 18:08:14,205 do_selection_get(<GtkSelectionData at 0x7ffcbd5b3540>, 0, 1472824314) selection=CLIPBOARD
2015-04-13 18:08:14,205 get clipboard from remote handler id=31
2015-04-13 18:08:14,215 process clipboard packet type=clipboard-contents
2015-04-13 18:08:14,215 process clipboard contents, selection=CLIPBOARD, type=ATOM, format=32
2015-04-13 18:08:14,215 _munge_wire_selection_to_raw(atoms, ATOM, 32, <type 'tuple'>:1:['UTF8_STRING'])
2015-04-13 18:08:14,216 _munge_wire_selection_to_raw(atoms, ATOM, 32, <type 'tuple'>:1)=[<GdkAtom 0x47 = 'UTF8_STRING'>]=[71L]=['G', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00']
2015-04-13 18:08:14,216 clipboard wire -> raw: ('ATOM', 32, 'atoms', ('UTF8_STRING',)) -> 'G\x00\x00\x00\x00\x00\x00\x00'
2015-04-13 18:08:14,216 got clipboard contents for id=31 len=8, loop=<xpra.gtk_common.nested_main.NestedMainLoop object at 0x1ad2d10> (type=ATOM, format=32)
2015-04-13 18:08:14,217 get clipboard from remote result(31)={'data': 'G\x00\x00\x00\x00\x00\x00\x00', 'type': 'ATOM', 'format': 32}
2015-04-13 18:08:14,217 do_selection_get(<GtkSelectionData at 0x7ffcbd5b3540>,0,1472824314) calling selection_data.set(ATOM, 32, <type 'str'>:8)
2015-04-13 18:08:14,218 do_selection_request_event(<gtk.gdk.Event at 0x128e918: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=application/x-moz-nativehtml, property=GDK_SELECTION>)
2015-04-13 18:08:14,218 target for CLIPBOARD: 'application/x-moz-nativehtml'
2015-04-13 18:08:14,219 do_selection_request_event(<gtk.gdk.Event at 0x128e918: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=application/x-moz-nativehtml, property=GDK_SELECTION>) target=application/x-moz-nativehtml, selection=CLIPBOARD
2015-04-13 18:08:14,219 do_selection_get(<GtkSelectionData at 0x7ffcbd5b3540>, 0, 1472824314) selection=CLIPBOARD
2015-04-13 18:08:14,219 get clipboard from remote handler id=32
2015-04-13 18:08:14,233 process clipboard packet type=clipboard-contents
2015-04-13 18:08:14,233 process clipboard contents, selection=CLIPBOARD, type=ATOM, format=32
2015-04-13 18:08:14,233 _munge_wire_selection_to_raw(atoms, ATOM, 32, <type 'tuple'>:1:['UTF8_STRING'])
2015-04-13 18:08:14,234 _munge_wire_selection_to_raw(atoms, ATOM, 32, <type 'tuple'>:1)=[<GdkAtom 0x47 = 'UTF8_STRING'>]=[71L]=['G', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00']
2015-04-13 18:08:14,234 clipboard wire -> raw: ('ATOM', 32, 'atoms', ('UTF8_STRING',)) -> 'G\x00\x00\x00\x00\x00\x00\x00'
2015-04-13 18:08:14,234 got clipboard contents for id=32 len=8, loop=<xpra.gtk_common.nested_main.NestedMainLoop object at 0x1ad2d10> (type=ATOM, format=32)
2015-04-13 18:08:14,235 get clipboard from remote result(32)={'data': 'G\x00\x00\x00\x00\x00\x00\x00', 'type': 'ATOM', 'format': 32}
2015-04-13 18:08:14,235 do_selection_get(<GtkSelectionData at 0x7ffcbd5b3540>,0,1472824314) calling selection_data.set(ATOM, 32, <type 'str'>:8)

Tue, 14 Apr 2015 13:07:36 GMT - Antoine Martin: owner, status changed

Got it. I think.

Suspicious things:

gives this on the server side:

clipboard wire -> raw: ('ATOM', 32, 'atoms', ('UTF8_STRING',)) -> 'G\x00\x00\x00\x00\x00\x00\x00'

Not sure why we end up with 64 bits instead of 32 here.

Not sure why firefox requests application/x-moz-nativehtml when this isn't one of the targets!? Maybe we aren't setting the targets properly? The clipboard tool disagrees, but maybe firefox is not patient enough to see the value we set? (and this value was correct for the image...) Maybe we need a call to selection_clear_targets

Since we requested something nonsensical, you get garbage out. And we end up returning the atom instead of a string. I guess firefox doesn't check the selection's returned datatype, assumes it is a string and parses the bits of the atom number as a string... which gives 'G' (the numeric value of the atom UTF8_STRING). Should we re-validate requests against the list of targets? (cache it?)


Tue, 14 Apr 2015 13:48:57 GMT - Antoine Martin: attachment set

try to force clear the selection targets... (not helping)


Tue, 14 Apr 2015 13:52:31 GMT - Antoine Martin: attachment set

hardcoded patch to substitute the target string on the fly so we return a string


Tue, 14 Apr 2015 14:33:23 GMT - Antoine Martin:

I am now fairly certain that this is not a bug in xpra. The only thing we could do better would be to re-validate the request against the list of valid targets, since requesting something invalid is not helpful. The hack patch above (not to be used in production) makes us respond to the invalid TARGET specified as if it was UTF8_STRING, and cut&paste then works as if the application had requested a valid target.

We do set the targets properly, as can be seen with the clipboard tool. Most applications honour the targets we set, the only application I found so far which does not is firefox..

Also worth mentioning that I found two small fixes which may get backported:

Longer term, we do want #812 - the current clipboard code is just horrible.


Tue, 14 Apr 2015 21:44:08 GMT - alas:

Hmm... I think you are right, it isn't xpra's "just horrible" clipboard code.

Seems to behave as expected with chromium. Also seems to behave as expected with epiphany. Unfortunately our even more generic webkit is one of the offenders (once the clipboard copies/pastes an image, it no longer seems to recognize updates to clipboard).

Unless you can think of anything else to do with this (for the firefox image & text clipboard fans, or those using totally generic webkit browsers), I suppose you can close this.


Tue, 14 Apr 2015 21:59:16 GMT - alas:

Traceback (most recent call last):
  File "xpra\client\gl\gl_window_backing.pyc", line 459, in gl_expose_event
  File "xpra\client\gl\gl_window_backing.pyc", line 326, in gl_init
  File "latebind.pyx", line 32, in OpenGL_accelerate.latebind.LateBind.__call__ (c:\Users\mcfletch\OpenGL-dev\OpenGL-ctypes\OpenGL_accelerate\src\latebind.c:989)
  File "wrapper.pyx", line 318, in OpenGL_accelerate.wrapper.Wrapper.__call__ (c:\Users\mcfletch\OpenGL-dev\OpenGL-ctypes\OpenGL_accelerate\src\wrapper.c:6561)
OpenGL.error.GLError: GLError(
        err = 1281,
        description = 'invalid value',
        baseOperation = glTexImage2D,
        pyArgs = (
                GL_TEXTURE_RECTANGLE_ARB,
                0,
                GL_RGB,
                25320,
                582,
                0,
                GL_RGB,
                GL_UNSIGNED_BYTE,
                None,
        ),
        cArgs = (
                GL_TEXTURE_RECTANGLE_ARB,
                0,
                GL_RGB,
                25320,
                582,
                0,
                GL_RGB,
                GL_UNSIGNED_BYTE,
                None,
        ),
        cArguments = (
                GL_TEXTURE_RECTANGLE_ARB,
                0,
                GL_RGB,
                25320,
                582,
                0,
                GL_RGB,
                GL_UNSIGNED_BYTE,
                None,
        )
)

... odd, since there's no "mcfletch" directory in my c:\Users folder.


Wed, 15 Apr 2015 01:29:39 GMT - Antoine Martin: status changed; resolution set

Closing as this is not an xpra bug. You should be able to figure out where the bug comes from by writing a simple test tool similar to our own clipboard test tool. Then you can report the bug to the appropriate project.

re: mcfletch is "Mike Fletcher", the main pyopengl developer. You must be using a binary build that he made.


Wed, 15 Apr 2015 06:44:17 GMT - Antoine Martin:

Note minor clipboard fixes backported to v0.14.x, see r8999 and r9000.


Thu, 13 Apr 2017 13:13:24 GMT - Antoine Martin:

A workaround has been merged: ticket:1458#comment:5


Sat, 23 Jan 2021 05:07:24 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/834