aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-08-08 22:48:38 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-09-29 17:44:08 +0200
commitae44a8cd5c932f5a108dbc1cc92e3321f43b217d (patch)
tree168294bd1c590fe240b47a9c2a3d916980e2855f /nx-X11/programs/Xserver/hw
parent899339f5affafccece7f71e527436b17910ca9f7 (diff)
downloadnx-libs-ae44a8cd5c932f5a108dbc1cc92e3321f43b217d.tar.gz
nx-libs-ae44a8cd5c932f5a108dbc1cc92e3321f43b217d.tar.bz2
nx-libs-ae44a8cd5c932f5a108dbc1cc92e3321f43b217d.zip
Clipboard.c: add some more FIXMEs
Diffstat (limited to 'nx-X11/programs/Xserver/hw')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 298046352..400b966a6 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -715,6 +715,14 @@ void nxagentRequestSelection(XEvent *X)
*
* The selection does not matter here, we will return this for
* PRIMARY and CLIPBOARD.
+ *
+ * FIXME: shouldn't we support UTF8_STRING, too?
+ * FIXME: I am wondering if we should align this with
+ * nxagentConvertSelection, where we report more formats.
+ * FIXME: the perfect solution should not just answer with
+ * XA_STRING but ask the real owner what format it supports. The
+ * should then be sent to the original requestor.
+ * FIXME: these must be external Atoms!
*/
Atom targets[] = {XA_STRING};
@@ -753,6 +761,8 @@ void nxagentRequestSelection(XEvent *X)
* timestamp used to acquire ownership, selection owners must
* support conversion to TIMESTAMP, returning the timestamp they
* used to obtain the selection.
+ *
+ * FIXME: ensure we are reporting an _external_ timestamp
*/
int i = nxagentFindLastSelectionOwnerIndex(X->xselectionrequest.selection);
@@ -796,6 +806,7 @@ void nxagentRequestSelection(XEvent *X)
/*
* Request the real X server to transfer the selection content
* to the NX_CUT_BUFFER_CLIENT property of the serverWindow.
+ * FIXME: document how we can end up here
*/
XConvertSelection(nxagentDisplay, CurrentSelections[i].selection,
X->xselectionrequest.target, serverCutProperty,
@@ -1306,6 +1317,7 @@ void nxagentNotifySelection(XEvent *X)
/* Fill the property on the initial requestor with the requested data */
/* The XChangeProperty source code reveals it will always
return 1, no matter what, so no need to check the result */
+ /* FIXME: better use the format returned by above request */
XChangeProperty(nxagentDisplay,
lastServerRequestor,
lastServerProperty,
@@ -1331,6 +1343,7 @@ void nxagentNotifySelection(XEvent *X)
#endif
}
+ /* FIXME: free it or not? */
/*
* SAFE_XFree(pszReturnData);
*/
@@ -1384,6 +1397,7 @@ void nxagentResetSelectionOwner(void)
lastServerRequestor);
#endif
+ /* FIXME: maybe we should put back the event that lead us here. */
return;
}
@@ -1521,6 +1535,7 @@ void nxagentSetSelectionOwner(Selection *pSelection)
for (int i = 0; i < nxagentMaxSelections; i++)
{
+ /* FIXME: using CurrentSelections with the index limited my MaxSelections looks wrong */
if (pSelection->selection == CurrentSelections[i].selection)
{
#ifdef DEBUG
@@ -1679,6 +1694,9 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
/*
* The selection request target is TARGETS. The requestor is asking
* for a list of supported data formats. Currently there's 4 of them.
+ *
+ * FIXME: I am wondering if we should align this with
+ * nxagentRequestSelection, where we only report one format.
*/
if (target == clientTARGETS)
{
@@ -1819,6 +1837,8 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
serverWindow, CurrentTime);
}
+ /* FIXME: check returncode of XConvertSelection */
+
#ifdef DEBUG
fprintf(stderr, "%s: Sent XConvertSelection with target=[%s], property [%s]\n", __func__,
validateString(NameForAtom(target)), validateString(NameForAtom(property)));