Commit cf0571bb authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

NXwindow.c: call InitRootWindow from dix

parent 5327a85b
......@@ -497,9 +497,12 @@ CreateRootWindow(ScreenPtr pScreen)
return TRUE;
}
#ifndef NXAGENT_SERVER
void
#ifdef NXAGENT_SERVER
xorg_InitRootWindow(WindowPtr pWin)
#else
InitRootWindow(WindowPtr pWin)
#endif
{
ScreenPtr pScreen = pWin->drawable.pScreen;
int backFlag = CWBorderPixel | CWCursor | CWBackingStore;
......@@ -531,7 +534,6 @@ 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
......
......@@ -132,24 +132,6 @@ extern void nxagentSetVersionProperty(WindowPtr pWin);
void
InitRootWindow(WindowPtr pWin)
{
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",
(void *) pWin, nxagentWindowPriv(pWin)->window, (void *) pWin -> parent);
#endif
if (nxagentOption(Rootless))
{
#ifdef TEST
fprintf(stderr, "InitRootWindow: Assigned agent root to window at [%p][%ld] with parent [%p].\n",
(void *) pWin, nxagentWindowPriv(pWin)->window, (void *) pWin -> parent);
#endif
nxagentRootlessWindow = pWin;
}
/*
* A root window is created for each screen by main
* and the pointer is saved in screenInfo.screens as
......@@ -164,36 +146,17 @@ InitRootWindow(WindowPtr pWin)
* if you prefer) fits in the big picture.
*/
if (nxagentOption(Rootless))
{
#ifdef TEST
fprintf(stderr, "InitRootWindow: Going to create window as root at [%p][%ld] with parent [%p].\n",
(void *) pWin, nxagentWindowPriv(pWin)->window, (void *) pWin -> parent);
#endif
if (!(*pScreen->CreateWindow)(pWin))
return; /* XXX */
#ifdef TEST
fprintf(stderr, "InitRootWindow: Created window as root at [%p][%ld] with parent [%p].\n",
fprintf(stderr, "InitRootWindow: Assigned agent root to window at [%p][%ld] with parent [%p].\n",
(void *) pWin, nxagentWindowPriv(pWin)->window, (void *) pWin -> parent);
#endif
(*pScreen->PositionWindow)(pWin, 0, 0);
pWin->cursorIsNone = FALSE;
pWin->optional->cursor = rootCursor;
rootCursor->refcnt++;
if (blackRoot)
pWin->background.pixel = pScreen->blackPixel;
else
pWin->background.pixel = pScreen->whitePixel;
backFlag |= CWBackPixel;
pWin->backingStore = defaultBackingStore;
pWin->forcedBS = (defaultBackingStore != NotUseful);
nxagentRootlessWindow = pWin;
}
/* We SHOULD check for an error value here XXX */
(*pScreen->ChangeWindowAttributes)(pWin, backFlag);
xorg_InitRootWindow(pWin);
/*
* Map both the root and the default agent window.
......@@ -214,7 +177,7 @@ InitRootWindow(WindowPtr pWin)
char artsd_port[10];
short int nPort = atoi(display) + 7000;
sprintf(artsd_port,"%d", nPort);
nxagentPropagateArtsdProperties(pScreen, artsd_port);
nxagentPropagateArtsdProperties(pWin->drawable.pScreen, artsd_port);
}
#endif
......
......@@ -2538,6 +2538,10 @@ void nxagentMapDefaultWindows(void)
WindowPtr pWin = screenInfo.screens[i]->root;
ScreenPtr pScreen = pWin -> drawable.pScreen;
/*
* InitRootWindow does that already, but as MapWindow() is
* idempotent we keep it here, too
*/
MapWindow(pWin, serverClient);
if (nxagentOption(Rootless) == 0)
......
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