Commit c02ab70e authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

NXdispatch.c: Simplify InitSelections()

by calling upstream version from dispatch.c
parent 718a58fb
...@@ -213,16 +213,18 @@ UpdateCurrentTimeIf() ...@@ -213,16 +213,18 @@ UpdateCurrentTimeIf()
currentTime = systime; currentTime = systime;
} }
#ifndef NXAGENT_SERVER
void void
InitSelections() #ifdef NXAGENT_SERVER
xorg_InitSelections(void)
#else
InitSelections(void)
#endif
{ {
if (CurrentSelections) if (CurrentSelections)
free(CurrentSelections); free(CurrentSelections);
CurrentSelections = (Selection *)NULL; CurrentSelections = (Selection *)NULL;
NumCurrentSelections = 0; NumCurrentSelections = 0;
} }
#endif /* NXAGENT_SERVER */
#undef SMART_DEBUG #undef SMART_DEBUG
......
...@@ -203,12 +203,9 @@ extern int nxagentMaxSelections; ...@@ -203,12 +203,9 @@ extern int nxagentMaxSelections;
extern int nxOpenFont(ClientPtr, XID, Mask, unsigned, char*); extern int nxOpenFont(ClientPtr, XID, Mask, unsigned, char*);
void void
InitSelections() InitSelections(void)
{ {
if (CurrentSelections) xorg_InitSelections();
free(CurrentSelections);
CurrentSelections = (Selection *)NULL;
NumCurrentSelections = 0;
#ifdef NXAGENT_CLIPBOARD #ifdef NXAGENT_CLIPBOARD
{ {
...@@ -232,7 +229,6 @@ InitSelections() ...@@ -232,7 +229,6 @@ InitSelections()
CurrentSelections[nxagentClipboardSelection].client = NullClient; CurrentSelections[nxagentClipboardSelection].client = NullClient;
} }
#endif #endif
} }
#define MAJOROP ((xReq *)client->requestBuffer)->reqType #define MAJOROP ((xReq *)client->requestBuffer)->reqType
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment