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
4d139d59
Commit
4d139d59
authored
Jan 25, 2018
by
dimbor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nxagent client-mode: fix clipboard problem (eterbug #4332) by Danil Pleshakov
parent
4d3fb73f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
40 deletions
+12
-40
Clipboard.c
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+12
-40
No files found.
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
View file @
4d139d59
...
@@ -708,46 +708,18 @@ void nxagentRequestSelection(XEvent *X)
...
@@ -708,46 +708,18 @@ void nxagentRequestSelection(XEvent *X)
{
{
if
(
X
->
xselectionrequest
.
target
==
serverTARGETS
)
if
(
X
->
xselectionrequest
.
target
==
serverTARGETS
)
{
{
/*
Atom
xa_STRING
[
3
];
* the selection request target is TARGETS. The requestor is
xa_STRING
[
0
]
=
XA_STRING
;
* asking for a list of supported data formats. Currently
xa_STRING
[
1
]
=
serverUTF8_STRING
;
* there's only one format we support: XA_STRING
xa_STRING
[
2
]
=
serverTEXT
;
*
XChangeProperty
(
nxagentDisplay
,
* The selection does not matter here, we will return this for
X
->
xselectionrequest
.
requestor
,
* PRIMARY and CLIPBOARD.
X
->
xselectionrequest
.
property
,
*
XInternAtom
(
nxagentDisplay
,
"ATOM"
,
0
),
* FIXME: shouldn't we support UTF8_STRING, too?
sizeof
(
Atom
)
*
8
,
* FIXME: I am wondering if we should align this with
PropModeReplace
,
* nxagentConvertSelection, where we report more formats.
(
unsigned
char
*
)
xa_STRING
,
* FIXME: the perfect solution should not just answer with
3
);
* 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
};
int
numTargets
=
1
;
#ifdef DEBUG
fprintf
(
stderr
,
"%s: available targets:
\n
"
,
__func__
);
for
(
int
i
=
0
;
i
<
numTargets
;
i
++
)
fprintf
(
stderr
,
"%s: %s
\n
"
,
__func__
,
NameForAtom
(
targets
[
i
]));
fprintf
(
stderr
,
"
\n
"
);
#endif
/*
* pass on the requested list by setting the property provided
* by the requestor accordingly.
*/
XChangeProperty
(
nxagentDisplay
,
X
->
xselectionrequest
.
requestor
,
X
->
xselectionrequest
.
property
,
XInternAtom
(
nxagentDisplay
,
"ATOM"
,
0
),
sizeof
(
Atom
)
*
8
,
PropModeReplace
,
(
unsigned
char
*
)
&
targets
,
numTargets
);
nxagentReplyRequestSelection
(
X
,
True
);
nxagentReplyRequestSelection
(
X
,
True
);
}
}
else
if
(
X
->
xselectionrequest
.
target
==
serverTIMESTAMP
)
else
if
(
X
->
xselectionrequest
.
target
==
serverTIMESTAMP
)
...
...
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