From ulrich.sibiller@gmail.com  Wed Aug 27 23:32:00 2014
Received: (at submit) by bugs.x2go.org; 27 Aug 2014 21:32:01 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID
	autolearn=ham version=3.3.2
Received: from mail-la0-f49.google.com (mail-la0-f49.google.com [209.85.215.49])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 567415DB3E
	for <submit@bugs.x2go.org>; Wed, 27 Aug 2014 23:32:00 +0200 (CEST)
Received: by mail-la0-f49.google.com with SMTP id b17so116668lan.36
        for <submit@bugs.x2go.org>; Wed, 27 Aug 2014 14:31:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:sender:from:date:message-id:subject:to:content-type;
        bh=OMoQ1Awe/tjLqfNUfN08FQy0e9bRIHmJJUl0KzAxBSk=;
        b=txDlmzIPVogfWhbnjCqnSuUtVfQ9X7fSr413EXMUvDzwEdUzWROcLeNQoo+UN2SmZ9
         NB6SdVnuvtOvwsQEVNoQHYohZTUQLDJVhDt7ibGVyJQq7D3n3iN7krcOHfvdnq57U3G1
         DiY3yxTBSgaBkZa8rRYUoHcVC8DDnGitgpVfKRea7CteDAxsRzo0UxUiGeOr2WYC38x/
         dHaHk6w+DNgZbfr4kClVmOuKxhwdiOYhbQfOmT1yvzedBeww1YI4B8h2OjKFN1qCYT2z
         fkctxWeg3DEm8tyebSUjzxY2aAKNSuxEWjoRYgnLOSLZspzCGUu/fHYhiTAtZMWrFU4H
         300w==
X-Received: by 10.152.4.9 with SMTP id g9mr37769575lag.14.1409175119573; Wed,
 27 Aug 2014 14:31:59 -0700 (PDT)
MIME-Version: 1.0
Sender: ulrich.sibiller@gmail.com
Received: by 10.112.126.232 with HTTP; Wed, 27 Aug 2014 14:31:39 -0700 (PDT)
From: Ulrich Sibiller <u.sibiller@science-computing.de>
Date: Wed, 27 Aug 2014 23:31:39 +0200
X-Google-Sender-Auth: A68vT2OqJMqqJo_GXtvoOeZEzig
Message-ID: <CANVnVYJN7O0Bn0dO64tfvJJcy5TkN9svtn2R=Cj66_5s3Hs9Vg@mail.gmail.com>
Subject: Clipboard handling with XFIXES broken
To: submit@bugs.x2go.org
Content-Type: text/plain; charset=UTF-8

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.

