@@ -133,24 +133,6 @@ extern void nxagentSetVersionProperty(WindowPtr pWin);
133133void
134134InitRootWindow (WindowPtr pWin )
135135{
136- ScreenPtr pScreen = pWin -> drawable .pScreen ;
137- int backFlag = CWBorderPixel | CWCursor | CWBackingStore ;
138-
139- #ifdef TEST
140- fprintf (stderr , "InitRootWindow: Called for window at [%p][%ld] with parent [%p].\n" ,
141- (void * ) pWin , nxagentWindowPriv (pWin )-> window , (void * ) pWin -> parent );
142- #endif
143-
144- if (nxagentOption (Rootless ))
145- {
146- #ifdef TEST
147- fprintf (stderr , "InitRootWindow: Assigned agent root to window at [%p][%ld] with parent [%p].\n" ,
148- (void * ) pWin , nxagentWindowPriv (pWin )-> window , (void * ) pWin -> parent );
149- #endif
150-
151- nxagentRootlessWindow = pWin ;
152- }
153-
154136 /*
155137 * A root window is created for each screen by main
156138 * and the pointer is saved in screenInfo.screens as
@@ -165,36 +147,17 @@ InitRootWindow(WindowPtr pWin)
165147 * if you prefer) fits in the big picture.
166148 */
167149
168- #ifdef TEST
169- fprintf (stderr , "InitRootWindow: Going to create window as root at [%p][%ld] with parent [%p].\n" ,
170- (void * ) pWin , nxagentWindowPriv (pWin )-> window , (void * ) pWin -> parent );
171- #endif
172-
173- if (!(* pScreen -> CreateWindow )(pWin ))
174- return ; /* XXX */
175-
176- #ifdef TEST
177- fprintf (stderr , "InitRootWindow: Created window as root at [%p][%ld] with parent [%p].\n" ,
178- (void * ) pWin , nxagentWindowPriv (pWin )-> window , (void * ) pWin -> parent );
179- #endif
180-
181- (* pScreen -> PositionWindow )(pWin , 0 , 0 );
182-
183- pWin -> cursorIsNone = FALSE;
184- pWin -> optional -> cursor = rootCursor ;
185- rootCursor -> refcnt ++ ;
186-
187- if (blackRoot )
188- pWin -> background .pixel = pScreen -> blackPixel ;
189- else
190- pWin -> background .pixel = pScreen -> whitePixel ;
191- backFlag |= CWBackPixel ;
150+ if (nxagentOption (Rootless ))
151+ {
152+ #ifdef TEST
153+ fprintf (stderr , "InitRootWindow: Assigned agent root to window at [%p][%ld] with parent [%p].\n" ,
154+ (void * ) pWin , nxagentWindowPriv (pWin )-> window , (void * ) pWin -> parent );
155+ #endif
192156
193- pWin -> backingStore = defaultBackingStore ;
194- pWin -> forcedBS = ( defaultBackingStore != NotUseful );
157+ nxagentRootlessWindow = pWin ;
158+ }
195159
196- /* We SHOULD check for an error value here XXX */
197- (* pScreen -> ChangeWindowAttributes )(pWin , backFlag );
160+ xorg_InitRootWindow (pWin );
198161
199162 /*
200163 * Map both the root and the default agent window.
@@ -219,7 +182,7 @@ InitRootWindow(WindowPtr pWin)
219182 extern void nxagentPropagateArtsdProperties (ScreenPtr pScreen , char * port );
220183 nPort = atoi (display ) + 7000 ;
221184 sprintf (artsd_port ,"%d" , nPort );
222- nxagentPropagateArtsdProperties (pScreen , artsd_port );
185+ nxagentPropagateArtsdProperties (pWin -> drawable . pScreen , artsd_port );
223186 }
224187 #endif
225188
0 commit comments