--- ray/src/px/xshowtrace.c 1992/04/21 17:24:51 2.2 +++ ray/src/px/xshowtrace.c 1993/05/03 11:21:30 2.6 @@ -24,7 +24,7 @@ static char SCCSid[] = "$SunId$ LBL"; #endif char rtcom[] = "rtrace -h- -otp -fa -x 1"; -char xicom[] = "ximage"; +char xicom[] = "ximage -c 256"; VIEW ourview = STDVIEW; /* view for picture */ RESOLU ourres; /* picture resolution */ @@ -92,7 +92,8 @@ char *argv[]; exit(1); /* loop on input */ mainloop(); - + /* close pipe and exit */ + pclose(pin); exit(0); } @@ -188,6 +189,7 @@ int xoff, yoff; setvec(ipt) /* set up vector drawing for pick */ int ipt[2]; { + extern Window xfindwind(); XWindowAttributes wa; XColor xc; XGCValues gcv; @@ -195,10 +197,15 @@ int ipt[2]; Window rw, cw; unsigned int pm; /* compute pointer location */ - if (gwind == 0 && - (gwind = xfindwind(theDisplay, rwind, picture, 2)) == 0) { - fprintf(stderr, "%s: cannot find display window!\n", progname); - exit(1); + if (gwind == 0) { + register char *wn; + for (wn = picture; *wn; wn++); + while (wn > picture && wn[-1] != '/') wn--; + if ((gwind = xfindwind(theDisplay, rwind, wn, 4)) == 0) { + fprintf(stderr, "%s: cannot find display window!\n", + progname); + exit(1); + } } XQueryPointer(theDisplay, gwind, &rw, &cw, &rx, &ry, &wx, &wy, &pm); xoff = wx - ipt[0];