[X2Go-Commits] [nx-libs] 314/429: Clipboard.c: improve explanations/FIXMEs
git-admin at x2go.org
git-admin at x2go.org
Mon Oct 18 09:36:55 CEST 2021
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x
in repository nx-libs.
commit 2742fde0043d2690c3c7b22f137679d0b91dac6c
Author: Ulrich Sibiller <uli42 at gmx.de>
Date: Sun Sep 20 16:45:51 2020 +0200
Clipboard.c: improve explanations/FIXMEs
---
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index a72449633..a4f61ef19 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -923,12 +923,18 @@ void nxagentHandleSelectionRequestFromXServer(XEvent *X)
int i = nxagentFindLastSelectionOwnerIndex(X->xselectionrequest.selection);
if (i < nxagentMaxSelections)
{
+#if 0
if (lastClientWindowPtr != NULL && IS_INTERNAL_OWNER(i))
{
/*
* Request the real X server to transfer the selection content
* to the NX_CUT_BUFFER_SERVER property of the serverWindow.
* FIXME: document how we can end up here
+ *
+ * It looks like this is only reached when the real X server is
+ * on Windows. I suspect that this is connected to the windows X
+ * server (VcXSrv in my test) pushing PRIMARY or CLIPBOARD
+ * content to the Windows clipboard whenever they change.
*/
XConvertSelection(nxagentDisplay, CurrentSelections[i].selection,
X->xselectionrequest.target, serverTransToAgentProperty,
@@ -949,6 +955,7 @@ void nxagentHandleSelectionRequestFromXServer(XEvent *X)
SAFE_XFree(strProperty);
}
else
+#endif
{
/*
* if one of our clients owns the selection we ask it to copy
@@ -1683,6 +1690,7 @@ static void setSelectionOwner(Selection *pSelection)
/*
* we are in the process of communicating back and forth between
* real X server and nxagent's clients - let's not disturb
+ * FIXME: by continuing after the warning were ARE disturbing!
*/
fprintf (stderr, "%s: WARNING! Requestor window [0x%x] already set.\n", __func__,
lastServerRequestor);
@@ -1804,6 +1812,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
"notifying failure to client %s\n", __func__, nxagentClientInfoString(client));
#endif
+ /* notify the waiting client of failure */
endTransfer(SELECTION_FAULT);
}
else
@@ -1999,7 +2008,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
XConvertSelection(nxagentDisplay, selection, t, p, serverWindow, CurrentTime);
- /* FIXME: check returncode of XConvertSelection */
+ /* FIXME: check result of XConvertSelection? */
#ifdef DEBUG
fprintf(stderr, "%s: Sent XConvertSelection with target [%s], property [%s]\n", __func__, tstr, pstr);
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list