aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-11-18 00:56:27 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-01-05 23:36:02 +0100
commit8500b4bc0d1bb00bf5ace9e173ce1eebc9e6e6b6 (patch)
tree2ae2af194c2786974cd4f1e98023df92307e47be /nx-X11
parent7d9c5ad4d388f5ccd54b64e21e6ef3d89fcf64fd (diff)
downloadnx-libs-8500b4bc0d1bb00bf5ace9e173ce1eebc9e6e6b6.tar.gz
nx-libs-8500b4bc0d1bb00bf5ace9e173ce1eebc9e6e6b6.tar.bz2
nx-libs-8500b4bc0d1bb00bf5ace9e173ce1eebc9e6e6b6.zip
Clipboard.c: reorder atom allocation code
Place the allocation directly before the check for success. Use the same order for server and client atoms.
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 97f58a14a..69cc7ecc5 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -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