aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-02-14 23:27:46 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-05-07 14:57:21 +0200
commit649c17524918f90789b92911ef3be57dad0af0b8 (patch)
tree113a554383260bd05c3b96c81f90ab1d77117060
parentfad1b5f0c9a819b500b1c7a82dc0a87c6a296e2f (diff)
downloadnx-libs-649c17524918f90789b92911ef3be57dad0af0b8.tar.gz
nx-libs-649c17524918f90789b92911ef3be57dad0af0b8.tar.bz2
nx-libs-649c17524918f90789b92911ef3be57dad0af0b8.zip
Clipboard.c: rename static helpers and macros
drop the nxagent prefix to emphasize they are not called from the outside. Also make them static and add prototypes, if missing.
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c201
1 files changed, 108 insertions, 93 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index b456b7113..88251adad 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -169,7 +169,7 @@ static char szAgentCLIPBOARD[] = "CLIPBOARD";
*/
#ifdef DEBUG
-const char * GetClientSelectionStageString(int stage)
+static const char * getClientSelectionStageString(int stage)
{
switch(stage)
{
@@ -181,13 +181,13 @@ const char * GetClientSelectionStageString(int stage)
default: return("UNKNOWN!"); break;;
}
}
-#define SetClientSelectionStage(stage) do {fprintf(stderr, "%s: Changing selection stage from [%s] to [%s]\n", __func__, GetClientSelectionStageString(lastClientStage), GetClientSelectionStageString(SelectionStage##stage)); lastClientStage = SelectionStage##stage;} while (0)
-#define PrintClientSelectionStage() do {fprintf(stderr, "%s: Current selection stage [%s]\n", __func__, GetClientSelectionStageString(lastClientStage));} while (0)
+#define setClientSelectionStage(stage) do {fprintf(stderr, "%s: Changing selection stage from [%s] to [%s]\n", __func__, getClientSelectionStageString(lastClientStage), getClientSelectionStageString(SelectionStage##stage)); lastClientStage = SelectionStage##stage;} while (0)
+#define printClientSelectionStage() do {fprintf(stderr, "%s: Current selection stage [%s]\n", __func__, getClientSelectionStageString(lastClientStage));} while (0)
#define WINDOWID(ptr) (ptr) ? (ptr->drawable.id) : 0
#define CLINDEX(clientptr) (clientptr) ? (clientptr->index) : -1
#else
-#define SetClientSelectionStage(stage) do {lastClientStage = SelectionStage##stage;} while (0)
-#define PrintClientSelectionStage()
+#define setClientSelectionStage(stage) do {lastClientStage = SelectionStage##stage;} while (0)
+#define printClientSelectionStage()
#endif
#ifdef DEBUG
@@ -197,7 +197,7 @@ const char * GetClientSelectionStageString(int stage)
* We use our own version to avoid Xlib doing expensive calls.
* FIXME: Must check if XGetErrorText() is really causing traffic over the wire.
*/
-const char * GetXErrorString(int code)
+const char * getXErrorString(int code)
{
switch(code)
{
@@ -232,17 +232,32 @@ XFixesAgentInfoRec nxagentXFixesInfo = { -1, -1, -1, 0 };
extern Display *nxagentDisplay;
-static Bool nxagentValidServerTargets(XlibAtom target);
+static Bool validServerTargets(XlibAtom target);
static void endTransfer(Bool success);
#define SELECTION_SUCCESS True
#define SELECTION_FAULT False
-static void nxagentTransferSelection(int resource);
+static void transferSelection(int resource);
#if 0
-void nxagentResetSelectionOwner(void);
+static void resetSelectionOwner(void);
#endif
-static void nxagentNotifyConvertFailure(ClientPtr client, Window requestor,
- Atom selection, Atom target, Time time);
-static void nxagentSetSelectionOwner(Selection *pSelection);
+static void initSelectionOwner(int index, Atom selection);
+static void clearSelectionOwner(int index);
+static void storeSelectionOwner(int index, Selection *sel);
+static Bool matchSelectionOwner(int index, ClientPtr pClient, WindowPtr pWindow);
+
+static void notifyConvertFailure(ClientPtr client, Window requestor,
+ Atom selection, Atom target, Time time);
+static void setSelectionOwner(Selection *pSelection);
+static int sendEventToClient(ClientPtr client, xEvent *pEvents);
+static int sendSelectionNotifyEventToClient(ClientPtr client,
+ Time time,
+ Window requestor,
+ Atom selection,
+ Atom target,
+ Atom property);
+static Status sendSelectionNotifyEventToServer(XSelectionEvent *event_to_send);
+static void printSelectionStat(int sel);
+static void replyRequestSelection(XEvent *X, Bool success);
void nxagentPrintClipboardStat(char *);
@@ -251,7 +266,7 @@ extern unsigned long startTime;
#endif
#ifdef DEBUG
-void nxagentPrintSelectionStat(int sel)
+static void printSelectionStat(int sel)
{
SelectionOwner lOwner = lastSelectionOwner[sel];
Selection curSel = CurrentSelections[sel];
@@ -345,12 +360,12 @@ void nxagentPrintClipboardStat(char *header)
fprintf(stderr, " lastClientTime (Time) [%u]\n", lastClientTime);
fprintf(stderr, " lastClientReqTime (Time) [%u]\n", lastClientReqTime);
fprintf(stderr, " lastClientPropertySize (unsigned long) [%lu]\n", lastClientPropertySize);
- fprintf(stderr, " lastClientStage (ClientSelectionStage) [%d][%s]\n", lastClientStage, GetClientSelectionStageString(lastClientStage));
+ fprintf(stderr, " lastClientStage (ClientSelectionStage) [%d][%s]\n", lastClientStage, getClientSelectionStageString(lastClientStage));
fprintf(stderr, "PRIMARY\n");
- nxagentPrintSelectionStat(nxagentPrimarySelection);
+ printSelectionStat(nxagentPrimarySelection);
fprintf(stderr, "CLIPBOARD\n");
- nxagentPrintSelectionStat(nxagentClipboardSelection);
+ printSelectionStat(nxagentClipboardSelection);
fprintf(stderr, "Atoms (remote X server)\n");
SAFE_XFree(s); s = XGetAtomName(nxagentDisplay, serverTARGETS);
@@ -398,7 +413,7 @@ int GetWindowProperty(WindowPtr pWin, Atom property, long longOffset, long longL
* Send a SelectionNotify event to the real X server and do some error
* handling (in DEBUG mode)
*/
-Status SendSelectionNotifyEventToServer(XSelectionEvent *event_to_send)
+static Status sendSelectionNotifyEventToServer(XSelectionEvent *event_to_send)
{
Window w = event_to_send->requestor;
@@ -422,7 +437,7 @@ Status SendSelectionNotifyEventToServer(XSelectionEvent *event_to_send)
{
if (result == BadValue || result == BadWindow)
{
- fprintf(stderr, "%s: WARNING! XSendEvent to [0x%x] failed: %s\n", __func__, w, GetXErrorString(result));
+ fprintf(stderr, "%s: WARNING! XSendEvent to [0x%x] failed: %s\n", __func__, w, getXErrorString(result));
}
else
{
@@ -436,17 +451,17 @@ Status SendSelectionNotifyEventToServer(XSelectionEvent *event_to_send)
return result;
}
-int SendEventToClient(ClientPtr client, xEvent *pEvents)
+static int sendEventToClient(ClientPtr client, xEvent *pEvents)
{
- return TryClientEvents (client, pEvents, 1, NoEventMask, NoEventMask, NullGrab);
+ return TryClientEvents(client, pEvents, 1, NoEventMask, NoEventMask, NullGrab);
}
-int SendSelectionNotifyEventToClient(ClientPtr client,
- Time time,
- Window requestor,
- Atom selection,
- Atom target,
- Atom property)
+static int sendSelectionNotifyEventToClient(ClientPtr client,
+ Time time,
+ Window requestor,
+ Atom selection,
+ Atom target,
+ Atom property)
{
xEvent x = {0};
x.u.u.type = SelectionNotify;
@@ -465,7 +480,7 @@ int SendSelectionNotifyEventToClient(ClientPtr client,
CLINDEX(client));
#endif
- return SendEventToClient(client, &x);
+ return sendEventToClient(client, &x);
}
/*
@@ -473,7 +488,7 @@ int SendSelectionNotifyEventToClient(ClientPtr client,
* server, like .e.g XA_STRING or UTF8_STRING. Other, non content type
* targets like "TARGETS" or "TIMESTAMP" will return false.
*/
-static Bool nxagentValidServerTargets(XlibAtom target)
+static Bool validServerTargets(XlibAtom target)
{
if (target == XA_STRING)
{
@@ -525,7 +540,7 @@ static Bool nxagentValidServerTargets(XlibAtom target)
return False;
}
-void nxagentInitSelectionOwner(int index, Atom selection)
+static void initSelectionOwner(int index, Atom selection)
{
lastSelectionOwner[index].selection = selection;
lastSelectionOwner[index].client = NullClient;
@@ -535,7 +550,7 @@ void nxagentInitSelectionOwner(int index, Atom selection)
}
/* there's no owner on nxagent side anymore */
-void nxagentClearSelectionOwner(int index)
+static void clearSelectionOwner(int index)
{
lastSelectionOwner[index].client = NULL;
lastSelectionOwner[index].window = None;
@@ -543,7 +558,7 @@ void nxagentClearSelectionOwner(int index)
lastSelectionOwner[index].lastTimeChanged = GetTimeInMillis();
}
-void nxagentStoreSelectionOwner(int index, Selection *sel)
+static void storeSelectionOwner(int index, Selection *sel)
{
lastSelectionOwner[index].client = sel->client;
lastSelectionOwner[index].window = sel->window;
@@ -551,7 +566,7 @@ void nxagentStoreSelectionOwner(int index, Selection *sel)
lastSelectionOwner[index].lastTimeChanged = GetTimeInMillis();
}
-Bool nxagentMatchSelectionOwner(int index, ClientPtr pClient, WindowPtr pWindow)
+static Bool matchSelectionOwner(int index, ClientPtr pClient, WindowPtr pWindow)
{
return ((pClient && lastSelectionOwner[index].client == pClient) ||
(pWindow && lastSelectionOwner[index].windowPtr == pWindow));
@@ -572,17 +587,17 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow)
for (int i = 0; i < nxagentMaxSelections; i++)
{
- if (nxagentMatchSelectionOwner(i, pClient, pWindow))
+ if (matchSelectionOwner(i, pClient, pWindow))
{
#ifdef TEST
fprintf(stderr, "%s: Resetting state with client [%p] window [%p].\n", __func__,
(void *) pClient, (void *) pWindow);
#endif
- nxagentClearSelectionOwner(i);
+ clearSelectionOwner(i);
lastClientWindowPtr = NULL;
- SetClientSelectionStage(None);
+ setClientSelectionStage(None);
lastServerRequestor = None;
}
@@ -591,7 +606,7 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow)
if (pWindow && pWindow == lastClientWindowPtr)
{
lastClientWindowPtr = NULL;
- SetClientSelectionStage(None);
+ setClientSelectionStage(None);
}
nxagentPrintClipboardStat("after nxagentClearClipboard");
@@ -668,7 +683,7 @@ void nxagentClearSelection(XEvent *X)
x.u.selectionClear.window = lastSelectionOwner[i].window;
x.u.selectionClear.atom = CurrentSelections[i].selection;
- SendEventToClient(lastSelectionOwner[i].client, &x);
+ sendEventToClient(lastSelectionOwner[i].client, &x);
}
/*
@@ -679,11 +694,11 @@ void nxagentClearSelection(XEvent *X)
CurrentSelections[i].window = screenInfo.screens[0]->root->drawable.id;
CurrentSelections[i].client = NullClient;
- nxagentClearSelectionOwner(i);
+ clearSelectionOwner(i);
}
lastClientWindowPtr = NULL;
- SetClientSelectionStage(None);
+ setClientSelectionStage(None);
nxagentPrintClipboardStat("after nxagentClearSelection");
}
@@ -692,7 +707,7 @@ void nxagentClearSelection(XEvent *X)
* event X. If success is True take the property from the event, else
* take None (which reports "failed/denied" to the requestor).
*/
-void nxagentReplyRequestSelection(XEvent *X, Bool success)
+static void replyRequestSelection(XEvent *X, Bool success)
{
XSelectionEvent eventSelection = {
.requestor = X->xselectionrequest.requestor,
@@ -710,7 +725,7 @@ void nxagentReplyRequestSelection(XEvent *X, Bool success)
eventSelection.property = None;
}
- SendSelectionNotifyEventToServer(&eventSelection);
+ sendSelectionNotifyEventToServer(&eventSelection);
}
/*
@@ -760,7 +775,7 @@ void nxagentRequestSelection(XEvent *X)
fprintf(stderr, "%s: denying additional request during transfer phase.\n", __func__);
#endif
- nxagentReplyRequestSelection(X, False);
+ replyRequestSelection(X, False);
return;
}
@@ -773,13 +788,13 @@ void nxagentRequestSelection(XEvent *X)
fprintf(stderr, "%s: not owning selection [%ld] - denying request.\n", __func__, X->xselectionrequest.selection);
#endif
- nxagentReplyRequestSelection(X, False);
+ replyRequestSelection(X, False);
return;
}
}
/* this is a special request like TARGETS or TIMESTAMP */
- if (!nxagentValidServerTargets(X->xselectionrequest.target))
+ if (!validServerTargets(X->xselectionrequest.target))
{
if (X->xselectionrequest.target == serverTARGETS)
{
@@ -826,7 +841,7 @@ void nxagentRequestSelection(XEvent *X)
(unsigned char*)&targets,
numTargets);
- nxagentReplyRequestSelection(X, True);
+ replyRequestSelection(X, True);
}
else if (X->xselectionrequest.target == serverTIMESTAMP)
{
@@ -855,19 +870,19 @@ void nxagentRequestSelection(XEvent *X)
PropModeReplace,
(unsigned char *) &lastSelectionOwner[i].lastTimeChanged,
1);
- nxagentReplyRequestSelection(X, True);
+ replyRequestSelection(X, True);
}
}
else
{
/*
* unknown special request - probably bug! Check if this code handles all cases
- * that are handled in nxagentValidServerTargets!
+ * that are handled in validServerTargets!
*/
#ifdef DEBUG
fprintf(stderr, "%s: unknown special target [%ld] - denying request.\n", __func__, X->xselectionrequest.target);
#endif
- nxagentReplyRequestSelection(X, False);
+ replyRequestSelection(X, False);
}
return;
}
@@ -949,7 +964,7 @@ void nxagentRequestSelection(XEvent *X)
else
x.u.selectionRequest.target = XA_STRING;
- SendEventToClient(lastSelectionOwner[i].client, &x);
+ sendEventToClient(lastSelectionOwner[i].client, &x);
#ifdef DEBUG
fprintf(stderr, "%s: sent SelectionRequest event to client [%d] property [%d][%s]" \
@@ -963,7 +978,7 @@ void nxagentRequestSelection(XEvent *X)
else
{
/* deny the request */
- nxagentReplyRequestSelection(X, False);
+ replyRequestSelection(X, False);
}
}
}
@@ -996,7 +1011,7 @@ static void endTransfer(Bool success)
CLINDEX(lastClientClientPtr));
#endif
- SendSelectionNotifyEventToClient(lastClientClientPtr,
+ sendSelectionNotifyEventToClient(lastClientClientPtr,
lastClientTime,
lastClientRequestor,
lastClientSelection,
@@ -1007,10 +1022,10 @@ static void endTransfer(Bool success)
* Enable further requests from clients.
*/
lastClientWindowPtr = NULL;
- SetClientSelectionStage(None);
+ setClientSelectionStage(None);
}
-static void nxagentTransferSelection(int resource)
+static void transferSelection(int resource)
{
if (lastClientClientPtr -> index != resource)
{
@@ -1030,7 +1045,7 @@ static void nxagentTransferSelection(int resource)
{
int result;
- PrintClientSelectionStage();
+ printClientSelectionStage();
/*
* Don't get data yet, just get size. We skip this stage in
@@ -1071,7 +1086,7 @@ static void nxagentTransferSelection(int resource)
return;
}
- SetClientSelectionStage(WaitSize);
+ setClientSelectionStage(WaitSize);
NXFlushDisplay(nxagentDisplay, NXFlushLink);
@@ -1081,7 +1096,7 @@ static void nxagentTransferSelection(int resource)
{
int result;
- PrintClientSelectionStage();
+ printClientSelectionStage();
/*
* Request the selection data now.
@@ -1125,7 +1140,7 @@ static void nxagentTransferSelection(int resource)
return;
}
- SetClientSelectionStage(WaitData);
+ setClientSelectionStage(WaitData);
/* we've seen situations where you had to move the mouse or press a
key to let the transfer complete. Flushing here fixed it */
@@ -1137,7 +1152,7 @@ static void nxagentTransferSelection(int resource)
{
#ifdef DEBUG
fprintf (stderr, "%s: WARNING! Inconsistent state [%s] for client [%d].\n", __func__,
- GetClientSelectionStageString(lastClientStage), CLINDEX(lastClientClientPtr));
+ getClientSelectionStageString(lastClientStage), CLINDEX(lastClientClientPtr));
#endif
break;
@@ -1198,7 +1213,7 @@ void nxagentCollectPropertyEvent(int resource)
{
case SelectionStageWaitSize:
{
- PrintClientSelectionStage();
+ printClientSelectionStage();
#ifdef DEBUG
fprintf (stderr, "%s: Got size notify event for client [%d].\n", __func__,
CLINDEX(lastClientClientPtr));
@@ -1222,15 +1237,15 @@ void nxagentCollectPropertyEvent(int resource)
* Request the selection data now.
*/
lastClientPropertySize = ulReturnBytesLeft;
- SetClientSelectionStage(QueryData);
+ setClientSelectionStage(QueryData);
- nxagentTransferSelection(resource);
+ transferSelection(resource);
}
break;
}
case SelectionStageWaitData:
{
- PrintClientSelectionStage();
+ printClientSelectionStage();
#ifdef DEBUG
fprintf (stderr, "%s: Got data notify event for client [%d].\n", __func__,
CLINDEX(lastClientClientPtr));
@@ -1272,7 +1287,7 @@ void nxagentCollectPropertyEvent(int resource)
{
#ifdef DEBUG
fprintf (stderr, "%s: WARNING! Inconsistent state [%s] for client [%d].\n", __func__,
- GetClientSelectionStageString(lastClientStage), CLINDEX(lastClientClientPtr));
+ getClientSelectionStageString(lastClientStage), CLINDEX(lastClientClientPtr));
#endif
break;
}
@@ -1310,7 +1325,7 @@ void nxagentHandleSelectionNotifyFromXServer(XEvent *X)
}
#endif
- PrintClientSelectionStage();
+ printClientSelectionStage();
if (lastClientWindowPtr != NULL)
{
@@ -1341,10 +1356,10 @@ void nxagentHandleSelectionNotifyFromXServer(XEvent *X)
* tions.
*/
- SetClientSelectionStage(QueryData);
+ setClientSelectionStage(QueryData);
lastClientPropertySize = 262144;
- nxagentTransferSelection(lastClientClientPtr -> index);
+ transferSelection(lastClientClientPtr -> index);
}
else
{
@@ -1382,7 +1397,7 @@ void nxagentHandleSelectionNotifyFromXServer(XEvent *X)
#ifdef DEBUG
fprintf(stderr, "%s: GetWindowProperty() window [0x%x] property [%d] returned [%s]\n", __func__,
- lastSelectionOwner[i].window, clientCutProperty, GetXErrorString(result));
+ lastSelectionOwner[i].window, clientCutProperty, getXErrorString(result));
#endif
if (result == BadAlloc || result == BadAtom ||
result == BadWindow || result == BadValue)
@@ -1398,7 +1413,7 @@ void nxagentHandleSelectionNotifyFromXServer(XEvent *X)
&pszReturnData);
#ifdef DEBUG
fprintf(stderr, "%s: GetWindowProperty() window [0x%x] property [%d] returned [%s]\n", __func__,
- lastSelectionOwner[i].window, clientCutProperty, GetXErrorString(result));
+ lastSelectionOwner[i].window, clientCutProperty, getXErrorString(result));
#endif
if (result == BadAlloc || result == BadAtom ||
@@ -1465,7 +1480,7 @@ void nxagentHandleSelectionNotifyFromXServer(XEvent *X)
(void *)eventSelection.requestor);
#endif
- SendSelectionNotifyEventToServer(&eventSelection);
+ sendSelectionNotifyEventToServer(&eventSelection);
lastServerRequestor = None; /* allow further request */
}
@@ -1480,7 +1495,7 @@ void nxagentHandleSelectionNotifyFromXServer(XEvent *X)
* the real X server (or its clients) will be sent to this window. The
* real X server never communicates with our windows directly.
*/
-void nxagentResetSelectionOwner(void)
+static void resetSelectionOwner(void)
{
if (lastServerRequestor != None)
{
@@ -1509,11 +1524,11 @@ void nxagentResetSelectionOwner(void)
fprintf(stderr, "%s: Reset selection state for selection [%d].\n", __func__, i);
#endif
- nxagentClearSelectionOwner(i);
+ clearSelectionOwner(i);
}
lastClientWindowPtr = NULL;
- SetClientSelectionStage(None);
+ setClientSelectionStage(None);
/* Hmm, this is already None when reaching this */
lastServerRequestor = None;
@@ -1571,9 +1586,9 @@ void nxagentSetSelectionCallback(CallbackListPtr *callbacks, void *data,
pCurSel->selection == clientCLIPBOARD))
{
#ifdef DEBUG
- fprintf(stderr, "%s: calling nxagentSetSelectionOwner\n", __func__);
+ fprintf(stderr, "%s: calling setSelectionOwner\n", __func__);
#endif
- nxagentSetSelectionOwner(pCurSel);
+ setSelectionOwner(pCurSel);
}
}
else if (info->kind == SelectionWindowDestroy)
@@ -1601,7 +1616,7 @@ void nxagentSetSelectionCallback(CallbackListPtr *callbacks, void *data,
* This is called from the nxagentSetSelectionCallback, so it is using
* internal Atoms
*/
-static void nxagentSetSelectionOwner(Selection *pSelection)
+static void setSelectionOwner(Selection *pSelection)
{
if (!agentClipboardInitialized)
{
@@ -1656,11 +1671,11 @@ static void nxagentSetSelectionOwner(Selection *pSelection)
* points to the struct that contains all information about the
* owner window.
*/
- nxagentStoreSelectionOwner(i, pSelection);
+ storeSelectionOwner(i, pSelection);
}
lastClientWindowPtr = NULL;
- SetClientSelectionStage(None);
+ setClientSelectionStage(None);
lastServerRequestor = None;
@@ -1677,7 +1692,7 @@ FIXME
lastSelectionOwnerWindowPtr = pSelection->pWin;
lastClientWindowPtr = NULL;
- SetClientSelectionStage(None);
+ setClientSelectionStage(None);
lastServerRequestor = None;
}
@@ -1685,7 +1700,7 @@ FIXME
*/
}
-static void nxagentNotifyConvertFailure(ClientPtr client, Window requestor,
+static void notifyConvertFailure(ClientPtr client, Window requestor,
Atom selection, Atom target, Time time)
{
/*
@@ -1700,7 +1715,7 @@ static void nxagentNotifyConvertFailure(ClientPtr client, Window requestor,
return;
}
- SendSelectionNotifyEventToClient(client, time, requestor, selection, target, None);
+ sendSelectionNotifyEventToClient(client, time, requestor, selection, target, None);
}
/*
@@ -1759,11 +1774,11 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
"notifying failure to client\n", __func__);
#endif
- nxagentNotifyConvertFailure(lastClientClientPtr, lastClientRequestor,
- lastClientSelection, lastClientTarget, lastClientTime);
+ notifyConvertFailure(lastClientClientPtr, lastClientRequestor,
+ lastClientSelection, lastClientTarget, lastClientTime);
lastClientWindowPtr = NULL;
- SetClientSelectionStage(None);
+ setClientSelectionStage(None);
}
else
{
@@ -1777,7 +1792,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
"before timeout expired on last request, notifying failure to client\n", __func__);
#endif
- nxagentNotifyConvertFailure(client, requestor, selection, target, time);
+ notifyConvertFailure(client, requestor, selection, target, time);
return 1;
}
@@ -1828,7 +1843,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
&targets,
1);
- SendSelectionNotifyEventToClient(client, time, requestor, selection, target, property);
+ sendSelectionNotifyEventToClient(client, time, requestor, selection, target, property);
return 1;
}
@@ -1864,7 +1879,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
(unsigned char *) &lastSelectionOwner[i].lastTimeChanged,
1);
- SendSelectionNotifyEventToClient(client, time, requestor, selection, target, property);
+ sendSelectionNotifyEventToClient(client, time, requestor, selection, target, property);
return 1;
}
@@ -1902,7 +1917,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
target == clientUTF8_STRING)
{
lastClientWindowPtr = pWin;
- SetClientSelectionStage(None);
+ setClientSelectionStage(None);
/*
* store the original requestor, we need that later after
* serverTransToAgentProperty contains the desired selection content
@@ -1963,7 +1978,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
fprintf(stderr, "%s: Unsupported target [%d][%s] - denying request\n", __func__, target,
validateString(NameForAtom(target)));
#endif
- SendSelectionNotifyEventToClient(client, time, requestor, selection, target, None);
+ sendSelectionNotifyEventToClient(client, time, requestor, selection, target, None);
return 1;
}
@@ -2094,7 +2109,7 @@ int nxagentSendNotify(xEvent *event)
NameForAtom(event->u.selectionNotify.property));
#endif
- SendSelectionNotifyEventToServer(&eventSelection);
+ sendSelectionNotifyEventToServer(&eventSelection);
return 1;
}
@@ -2156,8 +2171,8 @@ Bool nxagentInitClipboard(WindowPtr pWin)
{
FatalError("nxagentInitClipboard: Failed to allocate memory for the clipboard selections.\n");
}
- nxagentInitSelectionOwner(nxagentPrimarySelection, XA_PRIMARY);
- nxagentInitSelectionOwner(nxagentClipboardSelection, nxagentAtoms[10]); /* CLIPBOARD */
+ initSelectionOwner(nxagentPrimarySelection, XA_PRIMARY);
+ initSelectionOwner(nxagentClipboardSelection, nxagentAtoms[10]); /* CLIPBOARD */
}
else
{
@@ -2267,13 +2282,13 @@ Bool nxagentInitClipboard(WindowPtr pWin)
{
for (int i = 0; i < nxagentMaxSelections; i++)
{
- nxagentClearSelectionOwner(i);
+ clearSelectionOwner(i);
}
lastServerRequestor = None;
lastClientWindowPtr = NULL;
- SetClientSelectionStage(None);
+ setClientSelectionStage(None);
lastClientReqTime = GetTimeInMillis();
clientTARGETS = MakeAtom(szAgentTARGETS, strlen(szAgentTARGETS), True);