Commit 7675af8e authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

NXwindow.c: use upstream function DeleteWindow()

DeleteWindow() is calling FreeWindowResources() which is calling DisposeWindowOptional() which sets pWin->optional to NULL. So the now removed code was never called. After removal DeleteWindow() is identical to the dix version, so we use that one.
parent cf0571bb
......@@ -915,7 +915,6 @@ CrushTree(WindowPtr pWin)
* If wid is None, don't send any events
*****/
#ifndef NXAGENT_SERVER
int
DeleteWindow(void * value, XID wid)
{
......@@ -951,7 +950,6 @@ DeleteWindow(void * value, XID wid)
free(pWin);
return Success;
}
#endif /* NXAGENT_SERVER */
void
DestroySubwindows(register WindowPtr pWin, ClientPtr client)
......
......@@ -184,56 +184,6 @@ InitRootWindow(WindowPtr pWin)
nxagentSetVersionProperty(pWin);
}
/*****
* DeleteWindow
* Deletes child of window then window itself
* If wid is None, don't send any events
*****/
int
DeleteWindow(void * value, XID wid)
{
register WindowPtr pParent;
register WindowPtr pWin = (WindowPtr)value;
xEvent event;
UnmapWindow(pWin, FALSE);
CrushTree(pWin);
pParent = pWin->parent;
if (wid && pParent && SubStrSend(pWin, pParent))
{
memset(&event, 0, sizeof(xEvent));
event.u.u.type = DestroyNotify;
event.u.destroyNotify.window = pWin->drawable.id;
DeliverEvents(pWin, &event, 1, NullWindow);
}
FreeWindowResources(pWin);
if (pParent)
{
if (pParent->firstChild == pWin)
pParent->firstChild = pWin->nextSib;
if (pParent->lastChild == pWin)
pParent->lastChild = pWin->prevSib;
if (pWin->nextSib)
pWin->nextSib->prevSib = pWin->prevSib;
if (pWin->prevSib)
pWin->prevSib->nextSib = pWin->nextSib;
}
if (pWin -> optional &&
pWin -> optional -> colormap &&
pWin -> parent)
{
nxagentSetInstalledColormapWindows(pWin -> drawable.pScreen);
}
free(pWin);
return Success;
}
/* XXX need to retile border on each window with ParentRelative origin */
void
ResizeChildrenWinSize(register WindowPtr pWin, int dx, int dy, int dw, int dh)
......
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