xpra icon
Bug tracker and wiki

Opened 6 years ago

Closed 6 years ago

#99 closed defect (fixed)

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

Reported by: Timo Juhani Lindfors Owned by: Antoine Martin
Priority: minor Milestone: 0.2
Component: client Version: 0.1.0
Keywords: Cc:

Description (last modified by Antoine Martin)

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)

Change History (9)

comment:1 Changed 6 years ago by Antoine Martin

Description: modified (diff)
Status: newaccepted

comment:2 Changed 6 years ago by Antoine Martin

The relevant changesets and tickets are:

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

Last edited 6 years ago by Antoine Martin (previous) (diff)

comment:3 Changed 6 years ago by Antoine Martin

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.

comment:4 Changed 6 years ago by Antoine Martin

Milestone: current0.2
Priority: majorminor
Summary: copying and pasting text to qt applications does not workcopying and pasting text to qt applications does not work - CLIPBOARD selection

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 debug = log.info at the top of this file.

Last edited 6 years ago by Antoine Martin (previous) (diff)

comment:5 Changed 6 years ago by Timo Juhani Lindfors

Nice to hear that you can reproduce this.

comment:6 Changed 6 years ago by Antoine Martin

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

comment:7 Changed 6 years ago by Antoine Martin

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

comment:8 Changed 6 years ago by Antoine Martin

Description: modified (diff)
Summary: copying and pasting text to qt applications does not work - CLIPBOARD selectioncopying and pasting text to applications does not work - CLIPBOARD selection

comment:9 Changed 6 years ago by Antoine Martin

Resolution: fixed
Status: acceptedclosed

fixed in r705 + r706

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

Note: See TracTickets for help on using tickets.