Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copying and pasting text to applications does not work - CLIPBOARD selection #99

Closed
totaam opened this issue Apr 3, 2012 · 9 comments
Closed

Comments

@totaam
Copy link
Collaborator

totaam commented Apr 3, 2012

Issue migrated from trac ticket # 99

component: client | priority: minor | resolution: fixed

2012-04-03 11:16:27: lindi created the issue


Hi,

I don't know when this broke but r377 works and r585 does not.

Was this supposedly already fixed in some commit? It definitely seems to be broken in r678 still.

The problem occurs with qt applications and also java: see jedit in ticket #104:

java.lang.NullPointerException: Failed to retrieve atom name.
 at sun.awt.X11.XlibWrapper.XGetAtomName(Native Method)
 at sun.awt.X11.XAtom.getName(XAtom.java:169)
 at sun.awt.X11.XDataTransferer.getTargetNameForAtom(XDataTransferer.java:123)
 at sun.awt.X11.XDataTransferer.getNativeForFormat(XDataTransferer.java:112)
 at sun.awt.datatransfer.DataTransferer.getFlavorsForFormats(DataTransferer.java:769)
 at sun.awt.datatransfer.ClipboardTransferable.<init>(ClipboardTransferable.java:72)
 at sun.awt.X11.XClipboard.getContents(XClipboard.java:84)
 at org.gjt.sp.jedit.Registers$ClipboardRegister.getTransferable(Registers.java:822)
@totaam
Copy link
Collaborator Author

totaam commented Apr 3, 2012

2012-04-03 12:05:11: antoine commented


The relevant changesets and tickets are:

  • Xpra sun.awt.X11.XlibWrapper.XGetAtomName issue #8 which was fixed (wrong) in r490 and r491, although this allowed the application to run, the X11 atoms were not transferred correctly
  • r574 should be correct (not creating atoms to get an empty value), but maybe we want to create the atom if it does not exist?
  • r598 is a partial revert of r490 - see there for details

I can cut&paste to/from qt apps just fine with current trunk... it is hard to fix if I cannot reproduce the problem.

@totaam
Copy link
Collaborator Author

totaam commented Apr 4, 2012

2012-04-04 07:31:27: antoine commented


OK, got it, I always used double-click + middle-click to paste ("PRIMARY"), and that works ok.
What does not work is "CLIPBOARD" (explicit "cut" and "paste" actions).

No idea why, but now that I know how to test, I should be able to do something about it.

@totaam
Copy link
Collaborator Author

totaam commented Apr 4, 2012

2012-04-04 08:59:28: antoine commented


Also, it works fine from remote to local, just not from local to remote.

r700 makes it easier to turn on debugging for the clipboard class only: just change debug # log.debug to debuglog.info at the top of this file.

@totaam
Copy link
Collaborator Author

totaam commented Apr 4, 2012

2012-04-04 09:36:21: lindi commented


Nice to hear that you can reproduce this.

@totaam
Copy link
Collaborator Author

totaam commented Apr 4, 2012

2012-04-04 14:26:17: antoine commented


Original ticket that was meant to fix qt+clipboard: #84

@totaam
Copy link
Collaborator Author

totaam commented Apr 4, 2012

2012-04-04 20:20:52: antoine commented


Seeing that this could well be a problem with x11 atoms (as was #84), maybe a solution similar to #98 can apply here?

@totaam
Copy link
Collaborator Author

totaam commented Apr 5, 2012

2012-04-05 07:56:41: antoine changed title from copying and pasting text to qt applications does not work - CLIPBOARD selection to copying and pasting text to applications does not work - CLIPBOARD selection

@totaam
Copy link
Collaborator Author

totaam commented Apr 5, 2012

2012-04-05 18:22:44: antoine changed resolution from ** to fixed

@totaam
Copy link
Collaborator Author

totaam commented Apr 5, 2012

2012-04-05 18:22:44: antoine commented


fixed in r705 + r706

Only r706 is really needed, but r705 "should" be correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant