Open s-kotte opened 1 year ago
Please provide more details: server OS, browser, command line, etc. What application do you use for copying to the clipboard?
The html5
client is meant to set the greedy
property which should cause the server to send the updated data to the client.
The xpra server is running on a ubuntu:20.04 server with a wine 7 application shared via xpra. I have tested this on Windows with Firefox and Chrome, they behave the same. Whether I use ctrl + c or the context menu.
html5-Client settings:
floating_menu = yes
sound = no
video = no
blocked-hosts=xpra.org,www.xpra.org
encoding = png
keyboard_layout = de
clipboard = yes
xpra-server settings:
webcam=no
html=on
notifications=no
min-quality=98
exit-with-children=yes
env=XPRA_ACK_TOLERANCE=1000
pulseaudio=no
lock=yes
resize-display=4K
xpra command:
xpra start --start-child="wine ./program/LCS.exe" --bind-tcp=0.0.0.0:8085 --no-daemon
Does this also happen with a more easily installable application, say gedit
?
It works fine with gedit.
It looks like it only works in wine if I copy and paste alternately between the systems. Meaning:
It does not work if I want to copy something from the same system twice in a row. Meaning:
Sounds like wine
is not firing the clipboard change event.
Are there any default wine applications that exhibit this problem? (I have no idea what LCS.exe
is)
You can use the notepad.exe to test it.
OK. Will do.
The problem can be reproduced without the need for the html5 client, so I am moving the ticket to the xpra project.
Despite the fact that the wine code looks correct:
winex11.drv/clipboard.c
the clipboard handling is weird: it doesn't seem to claim the selection when you copy something to the clipboard in a wine application and it doesn't seem to monitor the selection for changes either.
Found some relevant links in Clipboard syncronization between wine and X11
I don't think I will have enough time to look into this further anytime soon as this is the type of ticket that takes ages to resolve. Sorry.
Anyway, thanks for the analysis. FYI, I was able to program a workaround. Clipboard synchronization works again when I manually trigger a clipboard change event in my Wine application.
@s-kotte I think 264e7c83d82aa1bc74306b618294d19b53d8b869 may be the fix for this bug. Can you try it? I can make new beta builds if needed. Are you still using Ubuntu 20.04?
@s-kotte I think 264e7c8 may be the fix for this bug. Can you try it? I can make new beta builds if needed. Are you still using Ubuntu 20.04?
Tested with the latest master version, unfortunately I can still reproduce the bug
@s-kotte can you provide a sample application that I can use to reproduce the issue?
Can you still reproduce the problems with notepad.exe
?
(works fine for me)
Is the fix already in version 6.0.1? I can't use the master version at the moment, it's not working for me.
Tested in version 6.0.1 with notepad.exe
and still reproducible
1: (Windows) Copy text 2: (Xpra client) Paste Step 2 does not work, no text is pasted
Your original description for this bug is:
If a text is copied from the clipboard and pasted into the html5 client, it works the first time. If I copy a second text and paste it back into the html5 client, the text from the first time is still pasted.
But in your latest comment, you seem to be copying from MS Windows to the xpra client? With a different result too: "no text is pasted". So this may well be a completely different issue.
The 264e7c83d82aa1bc74306b618294d19b53d8b869 fix (shipped in v6.0.1) was tested by:
Describe the bug
If a text is copied from the clipboard and pasted into the html5 client, it works the first time. If I copy a second text and paste it back into the html5 client, the text from the first time is still pasted.
Xpra Version
xpra server 4.4.4 with xpra-html5 client v7.0
Log: Copy "Test1" to clipboard
Log: Copy "Test2" to clipboard
I expect that when copying test2 for the second time, it will also be pasted and not test1.