Subject: Bug#585: Clipboard handling with XFIXES broken

From: Ulrich Sibiller <[email-masked]>
Date: Wed, 27 Aug 2014 23:31:39 +0200

Package: nx-xlibs
Version: 3.5.0-27

I have found a clipboard problem which only occurs when the XFIXES
extension is active. Sometimes qt applications running inside the
session cannot paste what has been selected outside the session.

Steps to reproduce:
1. start a new session (rootless or desktop, does not matter)
2. start at qt application within the session (I tried konsole and kedit)
3. start an xterm outside the session
4. select/mark some text in the qt app
5. paste the selection in the xterm with middle mouse button -> works
6. select/mark something in the xterm
7. paste the xterm selection with middle mouse button in the qt app ->
does not work, the text selected in step 4 gets pasted instead

I have tried that on Ubuntu 14.04, CentOS 6.5 and OpenSuse 11.4. These
all have different QT (and KDE) versions. I could provoke this on all
versions.

Workaround: turn off XFIXES extension

Some further observation:

If you run xfixes-selection.pl
(http://cpansearch.perl.org/src/KRYDE/X11-Protocol-Other-29/examples/xfixes-selection.pl)
both inside and outside the x2go/nx session while reproducing this you
can see that the SetSelectionOwner event of the XFIXES extension does
not reach the x2goagent when something is selected in the xterm but
both sides receive that event wehn something is selected in the qt
app.