diff options
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXevents.c | 5 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXproperty.c | 8 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 56 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 5 |
4 files changed, 38 insertions, 36 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c index 43cb806e7..727246cc7 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c @@ -547,13 +547,12 @@ ProcSendEvent(ClientPtr client) if (stuff->event.u.u.type == ClientMessage && stuff->event.u.u.detail != 8 && stuff->event.u.u.detail != 16 && - stuff->event.u.u.detail != 32 && - !permitOldBugs) + stuff->event.u.u.detail != 32) { client->errorValue = stuff->event.u.u.detail; return BadValue; } - if ((stuff->eventMask & ~AllEventMasks) && !permitOldBugs) + if (stuff->eventMask & ~AllEventMasks) { client->errorValue = stuff->eventMask; return BadValue; diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c index 882dbe61b..6292b3508 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c @@ -208,14 +208,11 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, Bool sendevent) { PropertyPtr pProp; - xEvent event; int sizeInBytes; int totalSize; void * data; int copySize; - memset(&event, 0, sizeof(xEvent)); - sizeInBytes = format>>3; totalSize = len * sizeInBytes; @@ -278,7 +275,7 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, { if (totalSize != pProp->size * (pProp->format >> 3)) { - data = (void *)realloc(pProp->data, totalSize); + data = (void *)realloc(pProp->data, totalSize); if (!data && len) return(BadAlloc); pProp->data = data; @@ -320,6 +317,8 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, } if (sendevent) { + xEvent event; + memset(&event, 0, sizeof(xEvent)); event.u.u.type = PropertyNotify; event.u.property.window = pWin->drawable.id; event.u.property.state = PropertyNewValue; @@ -350,7 +349,6 @@ ProcGetProperty(ClientPtr client) REQUEST(xGetPropertyReq); REQUEST_SIZE_MATCH(xGetPropertyReq); - if (stuff->delete) UpdateCurrentTime(); pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c index 5df252d34..d108d3ef3 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -138,9 +138,7 @@ extern void nxagentSetVersionProperty(WindowPtr pWin); void nxagentClearSplash(WindowPtr pW) { - ScreenPtr pScreen; - - pScreen = pW->drawable.pScreen; + ScreenPtr pScreen = pW->drawable.pScreen; if (pW->backgroundState == BackgroundPixmap) { @@ -189,9 +187,6 @@ MakeRootTile(WindowPtr pWin) for (j = len; j > 0; j--) *to++ = *from; - if (blackRoot) - bzero(back, sizeof(back)); - (*pGC->ops->PutImage)((DrawablePtr)pWin->background.pixmap, pGC, 1, 0, 0, len, 4, 0, XYBitmap, (char *)back); @@ -203,7 +198,8 @@ MakeRootTile(WindowPtr pWin) void InitRootWindow(WindowPtr pWin) { - ScreenPtr pScreen; + ScreenPtr pScreen = pWin->drawable.pScreen; + int backFlag = CWBorderPixel | CWCursor | CWBackingStore; #ifdef TEST fprintf(stderr, "InitRootWindow: Called for window at [%p][%ld] with parent [%p].\n", @@ -220,8 +216,6 @@ InitRootWindow(WindowPtr pWin) nxagentRootlessWindow = pWin; } - pScreen = pWin->drawable.pScreen; - /* * A root window is created for each screen by main * and the pointer is saved in screenInfo.screens as @@ -254,20 +248,34 @@ InitRootWindow(WindowPtr pWin) pWin->cursorIsNone = FALSE; pWin->optional->cursor = rootCursor; rootCursor->refcnt++; + +#ifdef NXAGENT_SPLASH + if (blackRoot) + pWin->background.pixel = pScreen->blackPixel; + else + pWin->background.pixel = pScreen->whitePixel; + backFlag |= CWBackPixel; + + MakeRootTile(pWin); +#else + if (!blackRoot && !whiteRoot) { + MakeRootTile(pWin); + backFlag |= CWBackPixmap; + } + else { + if (blackRoot) + pWin->background.pixel = pScreen->blackPixel; + else + pWin->background.pixel = pScreen->whitePixel; + backFlag |= CWBackPixel; + } +#endif + pWin->backingStore = defaultBackingStore; pWin->forcedBS = (defaultBackingStore != NotUseful); - #ifdef NXAGENT_SPLASH /* We SHOULD check for an error value here XXX */ - pWin -> background.pixel = pScreen -> blackPixel; - (*pScreen->ChangeWindowAttributes)(pWin, - CWBackPixel|CWBorderPixel|CWCursor|CWBackingStore); - #else - (*pScreen->ChangeWindowAttributes)(pWin, - CWBackPixmap|CWBorderPixel|CWCursor|CWBackingStore); - #endif - - MakeRootTile(pWin); + (*pScreen->ChangeWindowAttributes)(pWin, backFlag); /* * Map both the root and the default agent window. @@ -310,6 +318,7 @@ DeleteWindow(void * value, XID wid) { register WindowPtr pParent; register WindowPtr pWin = (WindowPtr)value; + xEvent event; UnmapWindow(pWin, FALSE); @@ -318,7 +327,7 @@ DeleteWindow(void * value, XID wid) pParent = pWin->parent; if (wid && pParent && SubStrSend(pWin, pParent)) { - xEvent event = {0}; + memset(&event, 0, sizeof(xEvent)); event.u.u.type = DestroyNotify; event.u.destroyNotify.window = pWin->drawable.id; DeliverEvents(pWin, &event, 1, NullWindow); @@ -874,7 +883,7 @@ MapWindow(register WindowPtr pWin, ClientPtr client) } pWin->mapped = TRUE; - if (SubStrSend(pWin, pParent)) + if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin)) { memset(&event, 0, sizeof(xEvent)); event.u.u.type = MapNotify; @@ -945,6 +954,7 @@ int UnmapWindow(register WindowPtr pWin, Bool fromConfigure) { register WindowPtr pParent; + xEvent event; Bool wasRealized = (Bool)pWin->realized; Bool wasViewable = (Bool)pWin->viewable; ScreenPtr pScreen = pWin->drawable.pScreen; @@ -960,9 +970,9 @@ UnmapWindow(register WindowPtr pWin, Bool fromConfigure) if ((!pWin->mapped) || (!(pParent = pWin->parent))) return(Success); - if (SubStrSend(pWin, pParent)) + if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin)) { - xEvent event = {0}; + memset(&event, 0, sizeof(xEvent)); event.u.u.type = UnmapNotify; event.u.unmapNotify.window = pWin->drawable.id; event.u.unmapNotify.fromConfigure = fromConfigure; diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 1c0fe5fa4..d06cb8495 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -139,11 +139,6 @@ specifies a file which contains a collection of authorization records used to authenticate access. See also the \fIxdm\fP(1) and \fIXsecurity\fP(__miscmansuffix__) manual pages. .TP 8 -.B bc -disables certain kinds of error checking, for bug compatibility with -previous releases (e.g., to work around bugs in R2 and R3 xterms and toolkits). -Deprecated. -.TP 8 .B \-bs disables backing store support on all screens. .TP 8 |