Hi,
Found another clipboard issue...
Client: Windows 7, v4.0-r25796 Server: RHEL 7.7, v3.0.5-r24939
Client xpra.conf contains remote-clipboard=PRIMARY
(see #2638 for full config)
Steps to reproduce:
xpra clipboard-test &
gitk
xpra clipboard-test
to verify that PRIMARY now contains "abcdefgh"
xpra clipboard-test
shows that PRIMARY now contains "xyz", but pasting into Notepad still pastes "ab"
gitk version is the version included with git 2.21.0 (gitk itself doesn't seem to have a --version flag or similar) Tk version: 8.5.13
Let me know if you need more info...
Can you attach the -d clipboard
log?
Attached. The logs show:
xpra clipboard-test
: shows "resolve" (doesn't seem to log anything)
Looks like the server log doesn't have -d clipboard
? (I only see the client clipboard debug output in there)
We should be sending a new token with the clipboard data every time the selection changes on the server, that's because mswindows clients are 'greedy' and won't be asking us for the clipboard contents when they're needed, so we have to ensure the contents are always up to date.
I don't think there's much we can do about this.
Other well behaved applications will use XFixesSelectionNotify
, ie with xterm:
do_xpra_xfixes_selection_notify_event(<X11:XFSelectionNotify {'send_event': '0', 'serial': '0x114fd', 'delivered_to': '0x400008', 'window': '0x400008', 'subtype': '0', 'owner': '0x60002d', 'selection': 'PRIMARY', 'timestamp': '238200596', 'selection_timestamp': '238200595' }>)
That's how you're supposed to get clipboard change notifications... See Use XFixesSelectSelectionInput() from Xfixes extension and wait for XFixesSelectionNotify event.
As per the spec: The XFIXES Extension: Selection Tracking: Applications wishing to monitor the contents of current selections must poll for selection changes. XFIXES improves this by providing an event delivered whenever the selection ownership changes.
This notification was part of xfixes version 2, released sometime in the mid-2000s...
Without it, we would have to poll the clipboard continuously. That's horrible and we already blacklist any application that does that (ie: clipit
), so not an option.
Ok, that makes sense, thanks. (Sorry about the logs - must have missed the -d clipboard
on the server.)
I just found a page about the Cygwin clipboard that mentions this is a problem with Tk applications: https://x.cygwin.com/docs/ug/using-clipboard-integration.html
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2689