diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2019-09-29 17:39:48 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2019-09-29 17:39:48 +0200 |
commit | 3a3a3373c36b5af6208ee5fdfe25e64b5766b75a (patch) | |
tree | 619edfb91b22fe9e604b115b6f88616e942709f9 /nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | |
parent | 796c8e421fd9df658fd5b324fcaa5182566e6905 (diff) | |
parent | 085f8a4f672ed3e167bdd7791835f7ab2bebb723 (diff) | |
download | nx-libs-3a3a3373c36b5af6208ee5fdfe25e64b5766b75a.tar.gz nx-libs-3a3a3373c36b5af6208ee5fdfe25e64b5766b75a.tar.bz2 nx-libs-3a3a3373c36b5af6208ee5fdfe25e64b5766b75a.zip |
Merge branch 'uli42-pr/various2' into 3.6.x
Attributes GH PR #827: https://github.com/ArcticaProject/nx-libs/pull/827
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 10616834e..b7a054913 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -194,6 +194,13 @@ extern int nxagentMaxAllowedResets; extern int nxagentFindClientResource(int, RESTYPE, void *); +#ifdef NXAGENT_CLIPBOARD +extern int nxagentPrimarySelection; +extern int nxagentClipboardSelection; +extern int nxagentMaxSelections; +#endif + +extern int nxOpenFont(ClientPtr, XID, Mask, unsigned, char*); void InitSelections() @@ -206,23 +213,23 @@ InitSelections() #ifdef NXAGENT_CLIPBOARD { Selection *newsels; - newsels = (Selection *)malloc(2 * sizeof(Selection)); + newsels = (Selection *)malloc(nxagentMaxSelections * sizeof(Selection)); if (!newsels) return; - NumCurrentSelections += 2; + NumCurrentSelections += nxagentMaxSelections; CurrentSelections = newsels; - CurrentSelections[0].selection = XA_PRIMARY; - CurrentSelections[0].lastTimeChanged = ClientTimeToServerTime(0); - CurrentSelections[0].window = screenInfo.screens[0]->root->drawable.id; - CurrentSelections[0].pWin = NULL; - CurrentSelections[0].client = NullClient; - - CurrentSelections[1].selection = MakeAtom("CLIPBOARD", 9, 1); - CurrentSelections[1].lastTimeChanged = ClientTimeToServerTime(0); - CurrentSelections[1].window = screenInfo.screens[0]->root->drawable.id; - CurrentSelections[1].pWin = NULL; - CurrentSelections[1].client = NullClient; + CurrentSelections[nxagentPrimarySelection].selection = XA_PRIMARY; + CurrentSelections[nxagentPrimarySelection].lastTimeChanged = ClientTimeToServerTime(0); + CurrentSelections[nxagentPrimarySelection].window = screenInfo.screens[0]->root->drawable.id; + CurrentSelections[nxagentPrimarySelection].pWin = NULL; + CurrentSelections[nxagentPrimarySelection].client = NullClient; + + CurrentSelections[nxagentClipboardSelection].selection = MakeAtom("CLIPBOARD", 9, 1); + CurrentSelections[nxagentClipboardSelection].lastTimeChanged = ClientTimeToServerTime(0); + CurrentSelections[nxagentClipboardSelection].window = screenInfo.screens[0]->root->drawable.id; + CurrentSelections[nxagentClipboardSelection].pWin = NULL; + CurrentSelections[nxagentClipboardSelection].client = NullClient; } #endif @@ -769,7 +776,6 @@ ProcOpenFont(register ClientPtr client) fontReq[stuff->nbytes]=0; if (strchr(fontReq,'*') || strchr(fontReq,'?')) { - extern int nxOpenFont(ClientPtr, XID, Mask, unsigned, char*); #ifdef NXAGENT_FONTMATCH_DEBUG fprintf(stderr, "Dispatch: ProcOpenFont try to find a common font with font pattern=%s\n",fontReq); #endif |