aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-09-01 14:57:27 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-11-02 11:39:30 +0100
commitcf0571bb49b255cb8056da1ea5f6d41e37eb834c (patch)
tree726e91adaef1f1f04a47aba914d0e2400ddba2ba
parent5327a85b777f87bdf8e57fdd6df5dc0350a1df2f (diff)
downloadnx-libs-cf0571bb49b255cb8056da1ea5f6d41e37eb834c.tar.gz
nx-libs-cf0571bb49b255cb8056da1ea5f6d41e37eb834c.tar.bz2
nx-libs-cf0571bb49b255cb8056da1ea5f6d41e37eb834c.zip
NXwindow.c: call InitRootWindow from dix
-rw-r--r--nx-X11/programs/Xserver/dix/window.c6
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXwindow.c57
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Window.c4
3 files changed, 18 insertions, 49 deletions
diff --git a/nx-X11/programs/Xserver/dix/window.c b/nx-X11/programs/Xserver/dix/window.c
index a35e79c11..04e0a2d05 100644
--- a/nx-X11/programs/Xserver/dix/window.c
+++ b/nx-X11/programs/Xserver/dix/window.c
@@ -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
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
index 77ee97f8a..bf1466e68 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
@@ -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.
*/
- #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",
- (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;
+ 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
- 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
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c
index 88110e7dc..ecf662f90 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
@@ -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)