aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-10-28 22:30:54 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-11-02 11:30:36 +0100
commit0fb6af25c8bb42c15f069f34b6c50797706d12e6 (patch)
tree8d5c515186994f5bbe4d0aec32b8efa40c264bd0 /nx-X11/programs/Xserver/hw
parentc61ac23f244899e68e77bf0381eb477a77a28740 (diff)
downloadnx-libs-0fb6af25c8bb42c15f069f34b6c50797706d12e6.tar.gz
nx-libs-0fb6af25c8bb42c15f069f34b6c50797706d12e6.tar.bz2
nx-libs-0fb6af25c8bb42c15f069f34b6c50797706d12e6.zip
NXdispatch.c: mark NX changes
Diffstat (limited to 'nx-X11/programs/Xserver/hw')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c64
1 files changed, 47 insertions, 17 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
index ace2941b1..00fb4ddd8 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
@@ -629,12 +629,17 @@ ProcQueryTree(register ClientPtr client)
reply.parent = (Window)None;
pHead = RealChildHead(pWin);
for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib)
+#ifdef NXAGENT_SERVER
{
- if (!IsViewportFrame(pChild))
- {
- numChildren++;
- }
+ if (!IsViewportFrame(pChild))
+ {
+ numChildren++;
+ }
+
}
+#else
+ numChildren++;
+#endif
if (numChildren)
{
int curChild = 0;
@@ -643,12 +648,16 @@ ProcQueryTree(register ClientPtr client)
if (!childIDs)
return BadAlloc;
for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib)
- {
- if (!IsViewportFrame(pChild))
- {
- childIDs[curChild++] = pChild->drawable.id;
- }
+#ifdef NXAGENT_SERVER
+ {
+ if (!IsViewportFrame(pChild))
+ {
+ childIDs[curChild++] = pChild->drawable.id;
+ }
}
+#else
+ childIDs[curChild++] = pChild->drawable.id;
+#endif
}
reply.nChildren = numChildren;
@@ -707,8 +716,12 @@ ProcConvertSelection(register ClientPtr client)
i = 0;
while ((i < NumCurrentSelections) &&
CurrentSelections[i].selection != stuff->selection) i++;
- if ((i < NumCurrentSelections) &&
+ if ((i < NumCurrentSelections) &&
+#ifdef NXAGENT_SERVER
(CurrentSelections[i].window != None) && (CurrentSelections[i].client != NullClient)
+#else
+ (CurrentSelections[i].window != None))
+#endif
#ifdef XCSECURITY
&& (!client->CheckAccess ||
(* client->CheckAccess)(client, CurrentSelections[i].window,
@@ -716,7 +729,6 @@ ProcConvertSelection(register ClientPtr client)
CurrentSelections[i].pWin))
#endif
)
-
{
memset(&event, 0, sizeof(xEvent));
event.u.u.type = SelectionRequest;
@@ -755,13 +767,14 @@ int
ProcOpenFont(register ClientPtr client)
{
int err;
- char fontReq[256];
REQUEST(xOpenFontReq);
REQUEST_FIXED_SIZE(xOpenFontReq, stuff->nbytes);
client->errorValue = stuff->fid;
LEGAL_NEW_RESOURCE(stuff->fid, client);
+#ifdef NXAGENT_SERVER
+ char fontReq[256];
memcpy(fontReq,(char *)&stuff[1],(stuff->nbytes<256)?stuff->nbytes:255);
fontReq[stuff->nbytes]=0;
if (strchr(fontReq,'*') || strchr(fontReq,'?'))
@@ -774,6 +787,7 @@ ProcOpenFont(register ClientPtr client)
stuff->nbytes, (char *)&stuff[1]);
}
else
+#endif
err = OpenFont(client, stuff->fid, (Mask) 0,
stuff->nbytes, (char *)&stuff[1]);
if (err == Success)
@@ -844,11 +858,12 @@ ProcCloseFont(register ClientPtr client)
int
ProcListFonts(register ClientPtr client)
{
- char tmp[256];
-
REQUEST(xListFontsReq);
REQUEST_FIXED_SIZE(xListFontsReq, stuff->nbytes);
+
+#ifdef NXAGENT_SERVER
+ char tmp[256];
memcpy(tmp,(unsigned char *) &stuff[1],(stuff->nbytes<256)?stuff->nbytes:255);
tmp[stuff->nbytes]=0;
@@ -856,6 +871,8 @@ ProcListFonts(register ClientPtr client)
fprintf(stderr, "Dispatch: ListFont request with pattern %s max_names=%d\n",tmp,stuff->maxNames);
#endif
nxagentListRemoteFonts(tmp, stuff -> maxNames < nxagentMaxFontNames ? nxagentMaxFontNames : stuff->maxNames);
+#endif
+
return ListFonts(client, (unsigned char *) &stuff[1], stuff->nbytes,
stuff->maxNames);
}
@@ -863,23 +880,24 @@ ProcListFonts(register ClientPtr client)
int
ProcListFontsWithInfo(register ClientPtr client)
{
- char tmp[256];
REQUEST(xListFontsWithInfoReq);
REQUEST_FIXED_SIZE(xListFontsWithInfoReq, stuff->nbytes);
+#ifdef NXAGENT_SERVER
+ char tmp[256];
memcpy(tmp,(unsigned char *) &stuff[1],(stuff->nbytes<256)?stuff->nbytes:255);
tmp[stuff->nbytes]=0;
#ifdef NXAGENT_FONTMATCH_DEBUG
fprintf(stderr, "Dispatch: ListFont with info request with pattern %s max_names=%d\n",tmp,stuff->maxNames);
#endif
nxagentListRemoteFonts(tmp, stuff -> maxNames < nxagentMaxFontNames ? nxagentMaxFontNames :stuff->maxNames);
+#endif
return StartListFontsWithInfo(client, stuff->nbytes,
(unsigned char *) &stuff[1], stuff->maxNames);
}
-
int
ProcFreePixmap(register ClientPtr client)
{
@@ -971,6 +989,7 @@ ProcSetScreenSaver (register ClientPtr client)
return BadValue;
}
+#ifdef NXAGENT_SERVER
/*
* The NX agent uses the screen saver procedure
* to monitor the user activities and launch its
@@ -985,6 +1004,7 @@ ProcSetScreenSaver (register ClientPtr client)
if (nxagentOption(Timeout) == 0)
{
+#endif
if (blankingOption == DefaultBlanking)
{
ScreenSaverBlanking = defaultScreenSaverBlanking;
@@ -1022,7 +1042,9 @@ ProcSetScreenSaver (register ClientPtr client)
}
SetScreenSaverTimer();
+#ifdef NXAGENT_SERVER
}
+
#ifdef TEST
else
@@ -1032,7 +1054,7 @@ ProcSetScreenSaver (register ClientPtr client)
}
#endif
-
+#endif
return (client->noClientException);
}
@@ -1050,6 +1072,7 @@ int ProcForceScreenSaver(register ClientPtr client)
return BadValue;
}
+#ifdef NXAGENT_SERVER
/*
* The NX agent uses the screen saver procedure
* to monitor the user activities and launch its
@@ -1060,7 +1083,9 @@ int ProcForceScreenSaver(register ClientPtr client)
if (nxagentOption(Timeout) == 0)
{
+#endif
SaveScreens(SCREEN_SAVER_FORCER, (int)stuff->mode);
+#ifdef NXAGENT_SERVER
}
#ifdef TEST
@@ -1072,6 +1097,7 @@ int ProcForceScreenSaver(register ClientPtr client)
}
#endif
+#endif
return client->noClientException;
}
@@ -1087,6 +1113,7 @@ int ProcForceScreenSaver(register ClientPtr client)
void
CloseDownClient(register ClientPtr client)
{
+#ifdef NXAGENT_SERVER
/*
* There must be a better way to hook a
* call-back function to be called any
@@ -1108,6 +1135,7 @@ CloseDownClient(register ClientPtr client)
*/
nxagentCheckIfShadowAgent(client);
+#endif
xorg_CloseDownClient(client);
}
@@ -1117,6 +1145,7 @@ InitClientPrivates(ClientPtr client)
{
int ret = xorg_InitClientPrivates(client);
+#ifdef NXAGENT_SERVER
if (ret == 1)
{
@@ -1126,6 +1155,7 @@ InitClientPrivates(ClientPtr client)
nxagentInitClientPrivates(client);
}
+#endif
return ret;
}