Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
ae44a8cd
Commit
ae44a8cd
authored
Aug 08, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
Sep 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clipboard.c: add some more FIXMEs
parent
899339f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
Clipboard.c
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+20
-0
No files found.
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
View file @
ae44a8cd
...
...
@@ -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
)));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment