From unknown Tue May 05 13:56:01 2026
X-Loop: owner@bugs.x2go.org
Subject: Bug#1369: [X2Go-Dev] Bug#1369: Bug#1369: Keys do not release when using Emacs in X2GO Client
Reply-To: "Andreas Ehliar - Emacs related" <emacs@ehliar.se>, 1369@bugs.x2go.org
Resent-From: "Andreas Ehliar - Emacs related" <emacs@ehliar.se>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Thu, 14 Jan 2021 16:45:02 +0000
Resent-Message-ID: <handler.1369.B1369.161064247812485@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: followup 1369
X-X2Go-PR-Package: x2goclient
X-X2Go-PR-Keywords: 
References: <CA+E0ge3vGXaAsgBbT3hGe24Q2vQ11+zhgd1yg+M-cZk1vjs0wA@mail.gmail.com>
Received: via spool by 1369-submit@bugs.x2go.org id=B1369.161064247812485
          (code B ref 1369); Thu, 14 Jan 2021 16:45:02 +0000
Received: (at 1369) by bugs.x2go.org; 14 Jan 2021 16:41:18 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50,HTML_MESSAGE,
	SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2
Received: from smtpout-51.fbg1.glesys.net (smtpout-51.fbg1.glesys.net [IPv6:2a02:751:100:2::51])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id C12D65DAC1
	for <1369@bugs.x2go.org>; Thu, 14 Jan 2021 17:41:15 +0100 (CET)
Received: from mail.glesys.se (185-39-145-142-static.serverhotell.net [185.39.145.142])
	by mail-halon-02.fbg1.glesys.net (Halon) with ESMTPA
	id 4ee5ffff-5687-11eb-b529-ebc997f73d07;
	Thu, 14 Jan 2021 17:41:10 +0100 (CET)
Mime-Version: 1.0
Date: Thu, 14 Jan 2021 16:41:10 +0000
Content-Type: multipart/alternative;
 boundary="----=_Part_287_295559224.1610642470"
Message-ID: <49edd52e90648791d560769cf7625f94@mail.glesys.se>
X-Mailer: Afterlogic webmail client
From: "Andreas Ehliar - Emacs related" <emacs@ehliar.se>
To: 1369@bugs.x2go.org
X-Priority: 3 (Normal)


------=_Part_287_295559224.1610642470
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

I may have found a hint of the root cause of this bug (tested with emacs =
27.1).=0AI believe that it is related to clipboard updating. If I disable=
 clipboard updating from emacs the stuck key behavior goes away.=0ANote t=
hat for every line that we widen the selection in emacs the clipboard is =
automatically updated. (I proved this by repeatedly pressing ctrl-v in no=
tepadwhile emacs exhibited the stuck key behavior and each time the paste=
d text grew.)=0AIf it turns out that emacs and/or x2go prioritizes clipbo=
ard updates before key-up events we may end up in a race where the clipbo=
ard takes longer to update than it takes emacs to scroll the cursor one l=
ine and enlarge the clipboard even further.=0ATo play around with this yo=
u can redefine the gui-set-selection function as a nop in emacs to disabl=
e the updating. (This is not a workaround though since it completely disa=
bles copying from an emacs window. A better work-around may be to add som=
e sort of rate-limit to this function but I haven't played around with th=
at yet.)=0A(defun gui-set-selection (type data))=0A/Andreas

------=_Part_287_295559224.1610642470
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html><html><head><meta http-equiv=3D"Content-Type" content=3D"t=
ext/html; charset=3Dutf-8" /></head><body><div data-crea=3D"font-wrapper"=
 style=3D"font-family: Tahoma, sans-serif; font-size: 16px; direction: lt=
r"><div>I may have found a hint of the root cause of this bug (tested wit=
h emacs 27.1).<br></div><div><br></div><div>I believe that it is related =
to clipboard updating. If I disable clipboard updating from emacs the stu=
ck key behavior goes away.</div><div>Note that for every line that we wid=
en the selection in emacs the clipboard is automatically updated. (I prov=
ed this by repeatedly pressing ctrl-v in notepadwhile emacs exhibited the=
 stuck key behavior and each time the pasted text grew.)</div><div><br></=
div><div><br></div><div>If it turns out that emacs and/or x2go prioritize=
s clipboard updates before key-up events we may end up in a race where th=
e clipboard takes longer to update than it takes emacs to scroll the curs=
or one line and enlarge the clipboard even further.</div><div><br></div><=
div>To play around with this you can redefine the gui-set-selection funct=
ion as a nop in emacs to disable the updating. (This is not a workaround =
though since it completely disables copying from an emacs window. A bette=
r work-around may be to add some sort of rate-limit to this function but =
I haven't played around with that yet.)</div><div><br></div><div>(defun g=
ui-set-selection (type data))</div><div><br></div><div>/Andreas</div><div=
><br></div><div></div></div></body></html>

------=_Part_287_295559224.1610642470--
