--- a/XWorkstation.st Thu Aug 21 19:52:53 1997 +0200
+++ b/XWorkstation.st Fri Aug 22 16:22:44 1997 +0200
@@ -324,28 +324,30 @@
* children contains a funny window (000034)
*/
# if !defined(IRIS) || defined(IRIX5)
- if (XQueryTree(dpy, root, &rootReturn, &parentReturn, &children, &numChildren)) {
- vRootAtom = XInternAtom(dpy, "__SWM_VROOT", True );
- if (vRootAtom != None) {
- for (i=0; i < numChildren; i++) {
- Atom actual_type;
- int actual_format;
- unsigned long nitems, bytesafter;
- Window* newRoot = (Window*) 0;
-
- if (children[i]) {
- if (XGetWindowProperty(dpy, children[i], vRootAtom,
- 0L, 1L, False, XA_WINDOW,
- &actual_type, &actual_format, &nitems, &bytesafter,
- (unsigned char**) &newRoot) == Success && newRoot) {
- root = *newRoot;
- XFree(newRoot); /* XXX */
- break;
+ if (root) {
+ if (XQueryTree(dpy, root, &rootReturn, &parentReturn, &children, &numChildren)) {
+ vRootAtom = XInternAtom(dpy, "__SWM_VROOT", True );
+ if (vRootAtom != None) {
+ for (i=0; i < numChildren; i++) {
+ Atom actual_type;
+ int actual_format;
+ unsigned long nitems, bytesafter;
+ Window* newRoot = (Window*) 0;
+
+ if (children[i]) {
+ if (XGetWindowProperty(dpy, children[i], vRootAtom,
+ 0L, 1L, False, XA_WINDOW,
+ &actual_type, &actual_format, &nitems, &bytesafter,
+ (unsigned char**) &newRoot) == Success && newRoot) {
+ root = *newRoot;
+ XFree(newRoot); /* XXX */
+ break;
+ }
}
- }
+ }
}
- }
- if (children) XFree( children );
+ if (children) XFree( children );
+ }
}
# endif
return root;
@@ -9368,6 +9370,6 @@
!XWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.259 1997-08-21 11:02:49 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.260 1997-08-22 14:22:44 cg Exp $'
! !
XWorkstation initialize!