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
8500b4bc
Commit
8500b4bc
authored
Nov 18, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
Jan 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clipboard.c: reorder atom allocation code
Place the allocation directly before the check for success. Use the same order for server and client atoms.
parent
7d9c5ad4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
Clipboard.c
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+10
-10
No files found.
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
View file @
8500b4bc
...
...
@@ -2136,7 +2136,6 @@ Bool nxagentInitClipboard(WindowPtr pWin)
FatalError
(
"nxagentInitClipboard: Failed to allocate memory for the clipboard selections.
\n
"
);
}
serverTIMESTAMP
=
nxagentAtoms
[
11
];
/* TIMESTAMP */
nxagentInitSelectionOwner
(
nxagentPrimarySelection
,
XA_PRIMARY
);
nxagentInitSelectionOwner
(
nxagentClipboardSelection
,
nxagentAtoms
[
10
]);
/* CLIPBOARD */
...
...
@@ -2151,17 +2150,18 @@ Bool nxagentInitClipboard(WindowPtr pWin)
agentClipboardInitialized
=
False
;
serverWindow
=
nxagentWindow
(
pWin
);
/*
* Local property to hold pasted data.
*/
serverCutProperty
=
nxagentAtoms
[
5
];
/* NX_CUT_BUFFER_SERVER */
serverTARGETS
=
nxagentAtoms
[
6
];
/* TARGETS */
serverTEXT
=
nxagentAtoms
[
7
];
/* TEXT */
serverUTF8_STRING
=
nxagentAtoms
[
12
];
/* UTF8_STRING */
serverCOMPOUND_TEXT
=
nxagentAtoms
[
16
];
/* COMPOUND_TEXT */
/* see nxagentSendNotify for an explanation */
serverUTF8_STRING
=
nxagentAtoms
[
12
];
/* UTF8_STRING */
serverTIMESTAMP
=
nxagentAtoms
[
11
];
/* TIMESTAMP */
/*
* Local properties to hold pasted data.
* see nxagentSendNotify for an explanation
*/
serverClientCutProperty
=
nxagentAtoms
[
15
];
/* NX_CUT_BUFFER_CLIENT */
serverCutProperty
=
nxagentAtoms
[
5
];
/* NX_CUT_BUFFER_SERVER */
if
(
serverCutProperty
==
None
)
{
...
...
@@ -2257,14 +2257,14 @@ Bool nxagentInitClipboard(WindowPtr pWin)
SetClientSelectionStage
(
None
);
lastClientReqTime
=
GetTimeInMillis
();
clientCutProperty
=
MakeAtom
(
szAgentNX_CUT_BUFFER_CLIENT
,
strlen
(
szAgentNX_CUT_BUFFER_CLIENT
),
1
);
clientTARGETS
=
MakeAtom
(
szAgentTARGETS
,
strlen
(
szAgentTARGETS
),
True
);
clientTEXT
=
MakeAtom
(
szAgentTEXT
,
strlen
(
szAgentTEXT
),
True
);
clientCOMPOUND_TEXT
=
MakeAtom
(
szAgentCOMPOUND_TEXT
,
strlen
(
szAgentCOMPOUND_TEXT
),
True
);
clientUTF8_STRING
=
MakeAtom
(
szAgentUTF8_STRING
,
strlen
(
szAgentUTF8_STRING
),
True
);
clientTIMESTAMP
=
MakeAtom
(
szAgentTIMESTAMP
,
strlen
(
szAgentTIMESTAMP
),
True
);
clientCutProperty
=
MakeAtom
(
szAgentNX_CUT_BUFFER_CLIENT
,
strlen
(
szAgentNX_CUT_BUFFER_CLIENT
),
True
);
if
(
clientCutProperty
==
None
)
{
#ifdef PANIC
...
...
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