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
a040e73a
Unverified
Commit
a040e73a
authored
Nov 15, 2019
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'uli42-pr/utf8_clipboard' into 3.6.x
Attributes GH PR #875:
https://github.com/ArcticaProject/nx-libs/pull/875
parents
6f5e483c
cfaf5972
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
Clipboard.c
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+13
-8
No files found.
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
View file @
a040e73a
...
...
@@ -716,23 +716,28 @@ 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!
* FIXME:
add serverCOMPOUND_TEXT?
*/
Atom
targets
[]
=
{
XA_STRING
};
int
numTargets
=
1
;
long
targets
[]
=
{
XA_STRING
,
serverUTF8_STRING
,
serverTEXT
,
serverTARGETS
,
serverTIMESTAMP
};
int
numTargets
=
sizeof
(
targets
)
/
sizeof
(
targets
[
0
])
;
#ifdef DEBUG
fprintf
(
stderr
,
"%s: available targets:
\n
"
,
__func__
);
{
fprintf
(
stderr
,
"%s: Sending %d available targets:
\n
"
,
__func__
,
numTargets
);
for
(
int
i
=
0
;
i
<
numTargets
;
i
++
)
fprintf
(
stderr
,
"%s: %s
\n
"
,
__func__
,
NameForAtom
(
targets
[
i
]));
{
char
*
s
=
XGetAtomName
(
nxagentDisplay
,
targets
[
i
]);
fprintf
(
stderr
,
"%s: %ld %s
\n
"
,
__func__
,
targets
[
i
],
s
);
SAFE_XFree
(
s
);
}
fprintf
(
stderr
,
"
\n
"
);
}
#endif
/*
...
...
@@ -743,7 +748,7 @@ void nxagentRequestSelection(XEvent *X)
X
->
xselectionrequest
.
requestor
,
X
->
xselectionrequest
.
property
,
XInternAtom
(
nxagentDisplay
,
"ATOM"
,
0
),
sizeof
(
Atom
)
*
8
,
32
,
PropModeReplace
,
(
unsigned
char
*
)
&
targets
,
numTargets
);
...
...
@@ -1702,7 +1707,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
{
/* --- Order changed by dimbor (prevent sending COMPOUND_TEXT to client --- */
Atom
targets
[]
=
{
XA_STRING
,
clientUTF8_STRING
,
clientTEXT
,
clientCOMPOUND_TEXT
};
int
numTargets
=
4
;
int
numTargets
=
sizeof
(
targets
)
/
sizeof
(
targets
[
0
])
;
#ifdef DEBUG
fprintf
(
stderr
,
"%s: available targets:
\n
"
,
__func__
);
...
...
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