aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/dix
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/dix')
-rw-r--r--nx-X11/programs/Xserver/dix/Imakefile92
-rw-r--r--nx-X11/programs/Xserver/dix/dispatch.c32
-rw-r--r--nx-X11/programs/Xserver/dix/dixfonts.c90
-rw-r--r--nx-X11/programs/Xserver/dix/events.c9
-rw-r--r--nx-X11/programs/Xserver/dix/extension.c4
-rw-r--r--nx-X11/programs/Xserver/dix/glyphcurs.c3
-rw-r--r--nx-X11/programs/Xserver/dix/property.c5
-rw-r--r--nx-X11/programs/Xserver/dix/resource.c6
-rw-r--r--nx-X11/programs/Xserver/dix/window.c68
9 files changed, 205 insertions, 104 deletions
diff --git a/nx-X11/programs/Xserver/dix/Imakefile b/nx-X11/programs/Xserver/dix/Imakefile
index 20be46390..ed7530caf 100644
--- a/nx-X11/programs/Xserver/dix/Imakefile
+++ b/nx-X11/programs/Xserver/dix/Imakefile
@@ -1,10 +1,8 @@
XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:16 cpqbld Exp $
-
-
-
-
XCOMM $XFree86: xc/programs/Xserver/dix/Imakefile,v 3.17 2003/04/15 18:30:43 alanh Exp $
+NULL =
+
#include <Server.tmpl>
XPSRC = xpstubs.c
@@ -15,18 +13,80 @@ FFS_SRC = ffs.c
FFS_OBJ = ffs.o
#endif
-SRCS = atom.c colormap.c cursor.c devices.c dispatch.c dixutils.c events.c \
- extension.c gc.c globals.c glyphcurs.c grabs.c \
- main.c property.c region.c resource.c swaprep.c swapreq.c \
- tables.c window.c initatoms.c dixfonts.c privates.c pixmap.c $(FFS_SRC)
-OBJS = atom.o colormap.o cursor.o devices.o dispatch.o dixutils.o events.o \
- extension.o gc.o globals.o glyphcurs.o grabs.o \
- main.o property.o region.o resource.o swaprep.o swapreq.o \
- tables.o window.o initatoms.o dixfonts.o privates.o pixmap.o $(FFS_OBJ)
-
- INCLUDES = -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \
- -I$(SERVERSRC)/Xext -I$(SERVERSRC)/lbx \
- `pkg-config --cflags-only-I pixman-1`
+#if (!(defined(NXAgentServer) && NXAgentServer))
+NXAGENT_SKIP_SRCS = \
+ dispatch.c \
+ dixfonts.c \
+ events.c \
+ extension.c \
+ glyphcurs.c \
+ property.c \
+ resource.c \
+ window.c \
+ $(NULL)
+NXAGENT_SKIP_OBJS = \
+ dispatch.o \
+ dixfonts.o \
+ events.o \
+ extension.o \
+ glyphcurs.o \
+ property.o \
+ resource.o \
+ window.o \
+ $(NULL)
+#endif
+
+
+SRCS = \
+ atom.c \
+ colormap.c \
+ cursor.c \
+ devices.c \
+ dixutils.c \
+ gc.c \
+ globals.c \
+ grabs.c \
+ main.c \
+ region.c \
+ swaprep.c \
+ swapreq.c \
+ tables.c \
+ initatoms.c \
+ privates.c \
+ pixmap.c \
+ $(NXAGENT_SKIP_SRCS) \
+ $(FFS_SRC) \
+ $(NULL)
+
+OBJS = \
+ atom.o \
+ colormap.o \
+ cursor.o \
+ devices.o \
+ dixutils.o \
+ gc.o \
+ globals.o \
+ grabs.o \
+ main.o \
+ region.o \
+ swaprep.o \
+ swapreq.o \
+ tables.o \
+ initatoms.o \
+ privates.o \
+ pixmap.o \
+ $(NXAGENT_SKIP_OBJS) \
+ $(FFS_OBJ) \
+ $(NULL)
+
+ INCLUDES = -I../include \
+ -I$(XINCLUDESRC) \
+ -I$(EXTINCSRC) \
+ -I$(SERVERSRC)/Xext \
+ -I$(SERVERSRC)/lbx \
+ `pkg-config --cflags-only-I pixman-1` \
+ $(NULL)
+
LINTLIBS = ../os/llib-los.ln
/*
diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c
index 66671d1f4..fe4da8a0c 100644
--- a/nx-X11/programs/Xserver/dix/dispatch.c
+++ b/nx-X11/programs/Xserver/dix/dispatch.c
@@ -209,6 +209,7 @@ UpdateCurrentTimeIf()
currentTime = systime;
}
+#ifndef NXAGENT_SERVER
void
InitSelections()
{
@@ -217,6 +218,7 @@ InitSelections()
CurrentSelections = (Selection *)NULL;
NumCurrentSelections = 0;
}
+#endif /* NXAGENT_SERVER */
void
FlushClientCaches(XID id)
@@ -349,6 +351,7 @@ SmartScheduleClient (int *clientReady, int nready)
}
#endif
+#ifndef NXAGENT_SERVER
#define MAJOROP ((xReq *)client->requestBuffer)->reqType
void
@@ -485,6 +488,7 @@ Dispatch(void)
}
#undef MAJOROP
+#endif /* NXAGENT_SERVER */
int
ProcBadRequest(ClientPtr client)
@@ -639,6 +643,7 @@ ProcChangeSaveSet(register ClientPtr client)
}
}
+#ifndef NXAGENT_SERVER
int
ProcReparentWindow(register ClientPtr client)
{
@@ -673,6 +678,7 @@ ProcReparentWindow(register ClientPtr client)
else
return (BadMatch);
}
+#endif /* NXAGENT_SERVER */
int
ProcMapWindow(register ClientPtr client)
@@ -790,6 +796,7 @@ GetGeometry(register ClientPtr client, xGetGeometryReply *rep)
REQUEST_SIZE_MATCH(xResourceReq);
SECURITY_VERIFY_GEOMETRABLE (pDraw, stuff->id, client, SecurityReadAccess);
+ memset(rep, 0, sizeof(xGetGeometryReply));
rep->type = X_Reply;
rep->length = 0;
rep->sequenceNumber = client->sequence;
@@ -829,7 +836,6 @@ ProcGetGeometry(register ClientPtr client)
xGetGeometryReply rep;
int status;
- memset(&rep, 0, sizeof(xGetGeometryReply));
if ((status = GetGeometry(client, &rep)) != Success)
return status;
@@ -838,6 +844,7 @@ ProcGetGeometry(register ClientPtr client)
}
+#ifndef NXAGENT_SERVER
int
ProcQueryTree(register ClientPtr client)
{
@@ -887,6 +894,8 @@ ProcQueryTree(register ClientPtr client)
return(client->noClientException);
}
+#endif /* NXAGENT_SERVER */
+
int
ProcInternAtom(register ClientPtr client)
@@ -950,6 +959,7 @@ ProcGetAtomName(register ClientPtr client)
extern int k5_bad();
#endif
+#ifndef NXAGENT_SERVER
int
ProcSetSelectionOwner(register ClientPtr client)
{
@@ -1045,6 +1055,7 @@ ProcSetSelectionOwner(register ClientPtr client)
return (BadAtom);
}
}
+#endif /* NXAGENT_SERVER */
int
ProcGetSelectionOwner(register ClientPtr client)
@@ -1078,6 +1089,7 @@ ProcGetSelectionOwner(register ClientPtr client)
}
}
+#ifndef NXAGENT_SERVER
int
ProcConvertSelection(register ClientPtr client)
{
@@ -1143,6 +1155,7 @@ ProcConvertSelection(register ClientPtr client)
return (BadAtom);
}
}
+#endif /* NXAGENT_SERVER */
int
ProcGrabServer(register ClientPtr client)
@@ -1285,6 +1298,7 @@ ProcTranslateCoords(register ClientPtr client)
return(client->noClientException);
}
+#ifndef NXAGENT_SERVER
int
ProcOpenFont(register ClientPtr client)
{
@@ -1324,6 +1338,7 @@ ProcCloseFont(register ClientPtr client)
return (BadFont);
}
}
+#endif /* NXAGENT_SERVER */
int
ProcQueryFont(register ClientPtr client)
@@ -1335,6 +1350,7 @@ ProcQueryFont(register ClientPtr client)
REQUEST_SIZE_MATCH(xResourceReq);
client->errorValue = stuff->id; /* EITHER font or gc */
+
pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT,
SecurityReadAccess);
if (!pFont)
@@ -1367,6 +1383,7 @@ ProcQueryFont(register ClientPtr client)
rlength = sizeof(xQueryFontReply) +
FONTINFONPROPS(FONTCHARSET(pFont)) * sizeof(xFontProp) +
nprotoxcistructs * sizeof(xCharInfo);
+
reply = (xQueryFontReply *)ALLOCATE_LOCAL(rlength);
if(!reply)
{
@@ -1435,6 +1452,7 @@ ProcQueryTextExtents(register ClientPtr client)
return(client->noClientException);
}
+#ifndef NXAGENT_SERVER
int
ProcListFonts(register ClientPtr client)
{
@@ -1456,6 +1474,7 @@ ProcListFontsWithInfo(register ClientPtr client)
return StartListFontsWithInfo(client, stuff->nbytes,
(unsigned char *) &stuff[1], stuff->maxNames);
}
+#endif /* NXAGENT_SERVER */
/**
*
@@ -1527,6 +1546,7 @@ CreatePmap:
return (BadAlloc);
}
+#ifndef NXAGENT_SERVER
int
ProcFreePixmap(register ClientPtr client)
{
@@ -1548,6 +1568,7 @@ ProcFreePixmap(register ClientPtr client)
return (BadPixmap);
}
}
+#endif /* NXAGENT_SERVER */
int
ProcCreateGC(register ClientPtr client)
@@ -3186,6 +3207,7 @@ ProcQueryBestSize (register ClientPtr client)
}
+#ifndef NXAGENT_SERVER
int
ProcSetScreenSaver (register ClientPtr client)
{
@@ -3241,6 +3263,7 @@ ProcSetScreenSaver (register ClientPtr client)
SetScreenSaverTimer();
return (client->noClientException);
}
+#endif /* NXAGENT_SERVER */
int
ProcGetScreenSaver(register ClientPtr client)
@@ -3446,6 +3469,7 @@ ProcChangeCloseDownMode(register ClientPtr client)
}
}
+#ifndef NXAGENT_SERVER
int ProcForceScreenSaver(register ClientPtr client)
{
REQUEST(xForceScreenSaverReq);
@@ -3461,6 +3485,7 @@ int ProcForceScreenSaver(register ClientPtr client)
SaveScreens(SCREEN_SAVER_FORCER, (int)stuff->mode);
return client->noClientException;
}
+#endif /* NXAGENT_SERVER */
int ProcNoOperation(register ClientPtr client)
{
@@ -3495,6 +3520,7 @@ InitProcVectors(void)
}
+
/**********************
* CloseDownClient
*
@@ -3502,6 +3528,7 @@ InitProcVectors(void)
* then killed again, the client is really destroyed.
*********************/
+#ifndef NXAGENT_SERVER
char dispatchExceptionAtReset = DE_RESET;
void
@@ -3589,6 +3616,7 @@ CloseDownClient(register ClientPtr client)
currentMaxClients--;
}
}
+#endif /* NXAGENT_SERVER */
static void
KillAllClients()
@@ -3682,6 +3710,7 @@ extern int clientPrivateLen;
extern unsigned *clientPrivateSizes;
extern unsigned totalClientSize;
+#ifndef NXAGENT_SERVER
int
InitClientPrivates(ClientPtr client)
{
@@ -3716,6 +3745,7 @@ InitClientPrivates(ClientPtr client)
}
return 1;
}
+#endif /* NXAGENT_SERVER */
/************************
* int NextAvailableClient(ospriv)
diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c
index ffa69c009..58e562411 100644
--- a/nx-X11/programs/Xserver/dix/dixfonts.c
+++ b/nx-X11/programs/Xserver/dix/dixfonts.c
@@ -72,63 +72,6 @@ Equipment Corporation.
#include <stdio.h>
#endif
-#ifdef NX_TRANS_SOCKET
-
-char _NXFontPath[1024];
-
-/*
- * Override the default font path and make
- * it configurable at run time, based on
- * the NX_FONT environment.
- */
-
-static const char *_NXGetFontPath(const char *path)
-{
- const char *fontEnv;
-
- /*
- * Check the environment only once.
- */
-
- if (*_NXFontPath != '\0')
- {
- return _NXFontPath;
- }
-
- fontEnv = getenv("NX_FONT");
-
- if (fontEnv != NULL && *fontEnv != '\0')
- {
- if (strlen(fontEnv) + 1 > 1024)
- {
-#ifdef NX_TRANS_TEST
- fprintf(stderr, "_NXGetFontPath: WARNING! Maximum length of font path exceeded.\n");
-#endif
- goto _NXGetFontPathError;
- }
-
- strcpy(_NXFontPath, fontEnv);
-
-#ifdef NX_TRANS_TEST
- fprintf(stderr, "_NXGetFontPath: Using NX font path [%s].\n", _NXFontPath);
-#endif
-
- return _NXFontPath;
- }
-
-_NXGetFontPathError:
-
- strcpy(_NXFontPath, path);
-
-#ifdef NX_TRANS_TEST
- fprintf(stderr, "_NXGetFontPath: Using default font path [%s].\n", _NXFontPath);
-#endif
-
- return _NXFontPath;
-}
-
-#endif
-
#ifdef PANORAMIX
#include "panoramiX.h"
#endif
@@ -288,6 +231,7 @@ FreeFPE (FontPathElementPtr fpe)
}
}
+#ifndef NXAGENT_SERVER
static Bool
doOpenFont(ClientPtr client, OFclosurePtr c)
{
@@ -438,6 +382,7 @@ bail:
xfree(c);
return TRUE;
}
+#endif /* NXAGENT_SERVER */
int
OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontname)
@@ -634,6 +579,7 @@ QueryFont(FontPtr pFont, xQueryFontReply *pReply, int nProtoCCIStructs)
return;
}
+#ifndef NXAGENT_SERVER
static Bool
doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
{
@@ -1163,6 +1109,7 @@ bail:
xfree(c);
return TRUE;
}
+#endif /* NXAGENT_SERVER */
int
StartListFontsWithInfo(ClientPtr client, int length, unsigned char *pattern,
@@ -1401,6 +1348,13 @@ doPolyText(ClientPtr client, register PTclosurePtr c)
err = BadAlloc;
goto bail;
}
+
+#ifdef NXAGENT_SERVER
+ pGC->tileIsPixel = TRUE;
+ pGC->tile.pixel = 0;
+ pGC->stipple = NullPixmap;
+#endif
+
if ((err = CopyGC(c->pGC, pGC, GCFunction |
GCPlaneMask | GCForeground |
GCBackground | GCFillStyle |
@@ -1593,6 +1547,13 @@ doImageText(ClientPtr client, register ITclosurePtr c)
err = BadAlloc;
goto bail;
}
+
+#ifdef NXAGENT_SERVER
+ pGC->tileIsPixel = TRUE;
+ pGC->tile.pixel = 0;
+ pGC->stipple = NullPixmap;
+#endif
+
if ((err = CopyGC(c->pGC, pGC, GCFunction | GCPlaneMask |
GCForeground | GCBackground | GCFillStyle |
GCTile | GCStipple | GCTileStipXOrigin |
@@ -1733,7 +1694,6 @@ find_existing_fpe(FontPathElementPtr *list, int num, unsigned char *name, int le
return (FontPathElementPtr) 0;
}
-
static int
SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist)
{
@@ -1810,11 +1770,13 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist)
err = (*fpe_functions[fpe->type].init_fpe) (fpe);
if (err != Successful)
{
+#ifndef NXAGENT_SERVER
if (persist)
{
ErrorF("Could not init font path element %s, removing from list!\n",
fpe->name);
}
+#endif /* NXAGENT_SERVER */
xfree (fpe->name);
xfree (fpe);
}
@@ -1862,6 +1824,7 @@ SetFontPath(ClientPtr client, int npaths, unsigned char *paths, int *error)
return err;
}
+#ifndef NXAGENT_SERVER
int
SetDefaultFontPath(char *path)
{
@@ -1876,19 +1839,11 @@ SetDefaultFontPath(char *path)
bad;
/* get enough for string, plus values -- use up commas */
-#ifdef NX_TRANS_SOCKET
- len = strlen(_NXGetFontPath(path)) + 1;
-#else
len = strlen(path) + 1;
-#endif
nump = cp = newpath = (unsigned char *) ALLOCATE_LOCAL(len);
if (!newpath)
return BadAlloc;
-#ifdef NX_TRANS_SOCKET
- pp = (unsigned char *) _NXGetFontPath(path);
-#else
pp = (unsigned char *) path;
-#endif
cp++;
while (*pp) {
if (*pp == ',') {
@@ -1910,6 +1865,7 @@ SetDefaultFontPath(char *path)
return err;
}
+#endif /* NXAGENT_SERVER */
unsigned char *
GetFontPath(int *count, int *length)
@@ -1928,7 +1884,7 @@ GetFontPath(int *count, int *length)
if (c == NULL) {
free(font_path_string);
font_path_string = NULL;
- return BadAlloc;
+ return NULL;
}
font_path_string = c;
diff --git a/nx-X11/programs/Xserver/dix/events.c b/nx-X11/programs/Xserver/dix/events.c
index 0fda4b294..31b76e38f 100644
--- a/nx-X11/programs/Xserver/dix/events.c
+++ b/nx-X11/programs/Xserver/dix/events.c
@@ -1218,6 +1218,7 @@ CheckGrabForSyncs(register DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
ComputeFreezes();
}
+#ifndef NXAGENT_SERVER
void
ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
TimeStamp time, Bool autoGrab)
@@ -1269,6 +1270,7 @@ DeactivatePointerGrab(register DeviceIntPtr mouse)
FreeCursor(grab->cursor, (Cursor)0);
ComputeFreezes();
}
+#endif /* NXAGENT_SERVER */
void
ActivateKeyboardGrab(register DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive)
@@ -1914,6 +1916,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
return FALSE;
}
+#ifndef NXAGENT_SERVER
static WindowPtr
XYToWindow(int x, int y)
{
@@ -1961,6 +1964,7 @@ XYToWindow(int x, int y)
}
return spriteTrace[spriteTraceGood-1];
}
+#endif /* NXAGENT_SERVER */
static Bool
CheckMotion(xEvent *xE)
@@ -2072,6 +2076,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
}
#endif
+#ifndef NXAGENT_SERVER
void
DefineInitialRootWindow(register WindowPtr win)
{
@@ -2113,6 +2118,7 @@ DefineInitialRootWindow(register WindowPtr win)
}
#endif
}
+#endif /* NXAGENT_SERVER */
/*
* This does not take any shortcuts, and even ignores its argument, since
@@ -3140,6 +3146,7 @@ EnterLeaveEvent(
}
if (mask & filters[type])
{
+ memset(&event, 0, sizeof(xEvent));
event.u.u.type = type;
event.u.u.detail = detail;
event.u.enterLeave.time = currentTime.milliseconds;
@@ -3966,6 +3973,7 @@ CloseDownEvents(void)
spriteTraceSize = 0;
}
+#ifndef NXAGENT_SERVER
int
ProcSendEvent(ClientPtr client)
{
@@ -4053,6 +4061,7 @@ ProcSendEvent(ClientPtr client)
NullGrab, 0);
return Success;
}
+#endif /* NXAGENT_SERVER */
int
ProcUngrabKey(ClientPtr client)
diff --git a/nx-X11/programs/Xserver/dix/extension.c b/nx-X11/programs/Xserver/dix/extension.c
index bc106d83c..fe51f8916 100644
--- a/nx-X11/programs/Xserver/dix/extension.c
+++ b/nx-X11/programs/Xserver/dix/extension.c
@@ -287,7 +287,7 @@ CloseDownExtensions()
}
}
-
+#ifndef NXAGENT_SERVER
int
ProcQueryExtension(ClientPtr client)
{
@@ -392,7 +392,7 @@ ProcListExtensions(ClientPtr client)
}
return(client->noClientException);
}
-
+#endif
ExtensionLookupProc
LookupProc(char *name, GCPtr pGC)
diff --git a/nx-X11/programs/Xserver/dix/glyphcurs.c b/nx-X11/programs/Xserver/dix/glyphcurs.c
index 726297d96..f715a327f 100644
--- a/nx-X11/programs/Xserver/dix/glyphcurs.c
+++ b/nx-X11/programs/Xserver/dix/glyphcurs.c
@@ -74,6 +74,7 @@ the first one we find.
cursor metrics.
*/
+#ifndef NXAGENT_SERVER
int
ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, unsigned char **ppbits)
{
@@ -138,7 +139,7 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
(*pScreen->DestroyPixmap)(ppix);
return Success;
}
-
+#endif /* NXAGENT_SERVER */
Bool
CursorMetricsFromGlyph(register FontPtr pfont, unsigned ch, register CursorMetricPtr cm)
diff --git a/nx-X11/programs/Xserver/dix/property.c b/nx-X11/programs/Xserver/dix/property.c
index 6041595ce..b3b650dda 100644
--- a/nx-X11/programs/Xserver/dix/property.c
+++ b/nx-X11/programs/Xserver/dix/property.c
@@ -188,6 +188,7 @@ found:
return Success;
}
+#ifndef NXAGENT_SERVER
int
ProcChangeProperty(ClientPtr client)
{
@@ -368,6 +369,7 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format,
}
return(Success);
}
+#endif /* NXAGENT_SERVER */
int
DeleteProperty(WindowPtr pWin, Atom propName)
@@ -446,6 +448,8 @@ NullPropertyReply(
return(client->noClientException);
}
+#ifndef NXAGENT_SERVER
+
/*****************
* GetProperty
* If type Any is specified, returns the property from the specified
@@ -600,6 +604,7 @@ ProcGetProperty(ClientPtr client)
}
return(client->noClientException);
}
+#endif /* NXAGENT_SERVER */
int
ProcListProperties(ClientPtr client)
diff --git a/nx-X11/programs/Xserver/dix/resource.c b/nx-X11/programs/Xserver/dix/resource.c
index dd7e88596..b0edbb2aa 100644
--- a/nx-X11/programs/Xserver/dix/resource.c
+++ b/nx-X11/programs/Xserver/dix/resource.c
@@ -422,6 +422,7 @@ FakeClientID(register int client)
return id;
}
+#ifndef NXAGENT_SERVER
Bool
AddResource(XID id, RESTYPE type, void * value)
{
@@ -457,6 +458,7 @@ AddResource(XID id, RESTYPE type, void * value)
rrec->expectID = id + 1;
return TRUE;
}
+#endif /* NXAGENT_SERVER */
static void
RebuildTable(int client)
@@ -507,6 +509,7 @@ RebuildTable(int client)
clientTable[client].resources = resources;
}
+#ifndef NXAGENT_SERVER
void
FreeResource(XID id, RESTYPE skipDeleteFuncType)
{
@@ -573,6 +576,7 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree)
}
}
}
+#endif /* NXAGENT_SERVER */
/*
* Change the value associated with a resource id. Caller
@@ -606,6 +610,7 @@ ChangeResourceValue (XID id, RESTYPE rtype, void * value)
* add and delete an equal number of resources!
*/
+#ifndef NXAGENT_SERVER
void
FindClientResourcesByType(
ClientPtr client,
@@ -693,6 +698,7 @@ LookupClientResourceComplex(
}
return NULL;
}
+#endif /* NXAGENT_SERVER */
void
diff --git a/nx-X11/programs/Xserver/dix/window.c b/nx-X11/programs/Xserver/dix/window.c
index 5a4818f88..708b67aa1 100644
--- a/nx-X11/programs/Xserver/dix/window.c
+++ b/nx-X11/programs/Xserver/dix/window.c
@@ -160,7 +160,7 @@ static Bool TileScreenSaver(int i, int kind);
int numSaveUndersViewable = 0;
int deltaSaveUndersViewable = 0;
-#ifdef DEBUG
+#if defined(DEBUG) || (defined(NXAGENT_SERVER) && defined(WINDOW_TREE_DEBUG))
/******
* PrintWindowTree
* For debugging only
@@ -286,6 +286,7 @@ SetWindowToDefaults(register WindowPtr pWin)
#endif
}
+#ifndef NXAGENT_SERVER
static void
MakeRootTile(WindowPtr pWin)
{
@@ -331,6 +332,7 @@ MakeRootTile(WindowPtr pWin)
FreeScratchGC(pGC);
}
+#endif /* NXAGENT_SERVER */
WindowPtr
AllocateWindow(ScreenPtr pScreen)
@@ -477,6 +479,7 @@ CreateRootWindow(ScreenPtr pScreen)
return TRUE;
}
+#ifndef NXAGENT_SERVER
void
InitRootWindow(WindowPtr pWin)
{
@@ -498,6 +501,7 @@ InitRootWindow(WindowPtr pWin)
MapWindow(pWin, serverClient);
}
+#endif /* NXAGENT_SERVER */
/* Set the region to the intersection of the rectangle and the
* window's winSize. The window is typically the parent of the
@@ -509,7 +513,6 @@ ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn,
register int x, register int y,
register int w, register int h)
{
- ScreenPtr pScreen = pWin->drawable.pScreen;
BoxRec box;
box = *(RegionExtents(&pWin->winSize));
@@ -872,13 +875,15 @@ CrushTree(WindowPtr pWin)
}
}
}
-
+
+
/*****
* DeleteWindow
* Deletes child of window then window itself
* If wid is None, don't send any events
*****/
+#ifndef NXAGENT_SERVER
int
DeleteWindow(void * value, XID wid)
{
@@ -914,6 +919,7 @@ DeleteWindow(void * value, XID wid)
xfree(pWin);
return Success;
}
+#endif /* NXAGENT_SERVER */
void
DestroySubwindows(register WindowPtr pWin, ClientPtr client)
@@ -1231,6 +1237,25 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt
#endif /* DO_SAVE_UNDERS */
break;
case CWEventMask:
+
+ /*
+ * TODO: Some applications like java bean shell
+ * don' t work if they cannot monitor the root
+ * window for Structure Redirect events. However
+ * this doesn't seem to be the best solution, since
+ * also an X server with a window manager running,
+ * doesn't allow to monitor for those events, but
+ * the java bean shell works flawlessy on this
+ * server.
+ *
+ * #ifdef NXAGENT_SERVER
+ * if (nxagentCheckIllegalRootMonitoring(pWin, (Mask)*pVlist))
+ * {
+ * return BadAccess;
+ * }
+ * #endif
+ */
+
result = EventSelectForWindow(pWin, client, (Mask )*pVlist);
if (result)
{
@@ -1599,8 +1624,6 @@ CreateUnclippedWinSize (register WindowPtr pWin)
pRgn = RegionCreate(&box, 1);
#ifdef SHAPE
if (wBoundingShape (pWin) || wClipShape (pWin)) {
- ScreenPtr pScreen = pWin->drawable.pScreen;
-
RegionTranslate(pRgn, - pWin->drawable.x,
- pWin->drawable.y);
if (wBoundingShape (pWin))
@@ -1635,8 +1658,6 @@ SetWinSize (register WindowPtr pWin)
(int)pWin->drawable.height);
#ifdef SHAPE
if (wBoundingShape (pWin) || wClipShape (pWin)) {
- ScreenPtr pScreen = pWin->drawable.pScreen;
-
RegionTranslate(&pWin->winSize, - pWin->drawable.x,
- pWin->drawable.y);
if (wBoundingShape (pWin))
@@ -1677,8 +1698,6 @@ SetBorderSize (register WindowPtr pWin)
(int)(pWin->drawable.height + (bw<<1)));
#ifdef SHAPE
if (wBoundingShape (pWin)) {
- ScreenPtr pScreen = pWin->drawable.pScreen;
-
RegionTranslate(&pWin->borderSize, - pWin->drawable.x,
- pWin->drawable.y);
RegionIntersect(&pWin->borderSize, &pWin->borderSize,
@@ -1752,6 +1771,7 @@ GravityTranslate (register int x, register int y, int oldx, int oldy,
}
/* XXX need to retile border on each window with ParentRelative origin */
+#ifndef NXAGENT_SERVER
void
ResizeChildrenWinSize(register WindowPtr pWin, int dx, int dy, int dw, int dh)
{
@@ -1816,6 +1836,7 @@ ResizeChildrenWinSize(register WindowPtr pWin, int dx, int dy, int dw, int dh)
}
}
}
+#endif /* NXAGENT_SERVER */
#define GET_INT16(m, f) \
if (m & mask) \
@@ -1888,7 +1909,6 @@ MakeBoundingRegion (
BoxPtr pBox)
{
RegionPtr pRgn;
- ScreenPtr pScreen = pWin->drawable.pScreen;
pRgn = RegionCreate(pBox, 1);
if (wBoundingShape (pWin)) {
@@ -1909,12 +1929,10 @@ ShapeOverlap (
BoxPtr pSibBox)
{
RegionPtr pWinRgn, pSibRgn;
- register ScreenPtr pScreen;
Bool ret;
if (!IS_SHAPED(pWin) && !IS_SHAPED(pSib))
return TRUE;
- pScreen = pWin->drawable.pScreen;
pWinRgn = MakeBoundingRegion (pWin, pWinBox);
pSibRgn = MakeBoundingRegion (pSib, pSibBox);
RegionIntersect(pWinRgn, pWinRgn, pSibRgn);
@@ -2015,7 +2033,6 @@ WhereDoIGoInTheStack(
int smode)
{
BoxRec box;
- register ScreenPtr pScreen;
WindowPtr pHead, pFirst;
if ((pWin == pWin->parent->firstChild) &&
@@ -2023,7 +2040,6 @@ WhereDoIGoInTheStack(
return((WindowPtr ) NULL);
pHead = RealChildHead(pWin->parent);
pFirst = pHead ? pHead->nextSib : pWin->parent->firstChild;
- pScreen = pWin->drawable.pScreen;
box.x1 = x;
box.y1 = y;
box.x2 = x + (int)w;
@@ -2164,6 +2180,7 @@ ReflectStackChange(
* ConfigureWindow
*****/
+#ifndef NXAGENT_SERVER
int
ConfigureWindow(register WindowPtr pWin, register Mask mask, XID *vlist, ClientPtr client)
{
@@ -2417,6 +2434,7 @@ ActuallyDoSomething:
#undef RESIZE_WIN
#undef REBORDER_WIN
}
+#endif /* NXAGENT_SERVER */
/******
@@ -2436,6 +2454,17 @@ CirculateWindow(WindowPtr pParent, int direction, ClientPtr client)
xEvent event;
BoxRec box;
+ /*
+ * #ifdef NXAGENT_SERVER
+ * if (nxagentOption(Rootless) && nxagentWMIsRunning &&
+ * nxagentWindowTopLevel(pWin) && pWin -> overrideRedirect == 0)
+ * {
+ * nxagentCirculateRootlessWindows(direction);
+ * return Success;
+ * }
+ * #endif
+ */
+
pHead = RealChildHead(pParent);
pFirst = pHead ? pHead->nextSib : pParent->firstChild;
if (direction == RaiseLowest)
@@ -2501,6 +2530,7 @@ CompareWIDs(
* ReparentWindow
*****/
+#ifndef NXAGENT_SERVER
int
ReparentWindow(register WindowPtr pWin, register WindowPtr pParent,
int x, int y, ClientPtr client)
@@ -2593,6 +2623,7 @@ ReparentWindow(register WindowPtr pWin, register WindowPtr pParent,
RecalculateDeliverableEvents(pWin);
return(Success);
}
+#endif /* NXAGENT_SERVER */
static void
RealizeTree(WindowPtr pWin)
@@ -2635,6 +2666,7 @@ RealizeTree(WindowPtr pWin)
* MapNotify event is generated.
*****/
+#ifndef NXAGENT_SERVER
int
MapWindow(register WindowPtr pWin, ClientPtr client)
{
@@ -2737,7 +2769,7 @@ MapWindow(register WindowPtr pWin, ClientPtr client)
return(Success);
}
-
+#endif /* NXAGENT_SERVER */
/*****
* MapSubwindows
@@ -2926,6 +2958,7 @@ UnrealizeTree(
* generated. Cannot unmap a root window.
*****/
+#ifndef NXAGENT_SERVER
int
UnmapWindow(register WindowPtr pWin, Bool fromConfigure)
{
@@ -2979,6 +3012,7 @@ UnmapWindow(register WindowPtr pWin, Bool fromConfigure)
WindowsRestructured ();
return(Success);
}
+#endif /* NXAGENT_SERVER */
/*****
* UnmapSubwindows
@@ -3159,10 +3193,8 @@ PointInWindowIsVisible(register WindowPtr pWin, int x, int y)
RegionPtr
NotClippedByChildren(register WindowPtr pWin)
{
- register ScreenPtr pScreen;
RegionPtr pReg;
- pScreen = pWin->drawable.pScreen;
pReg = RegionCreate(NullBox, 1);
if (pWin->parent ||
screenIsSaved != SCREEN_SAVER_ON ||
@@ -3251,6 +3283,7 @@ static void DrawLogo(
);
#endif
+#ifndef NXAGENT_SERVER
void
SaveScreens(int on, int mode)
{
@@ -3363,6 +3396,7 @@ SaveScreens(int on, int mode)
if (mode == ScreenSaverReset)
SetScreenSaverTimer();
}
+#endif /* NXAGENT_SERVER */
static Bool
TileScreenSaver(int i, int kind)