ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/xglaresrc.c
(Generate patch)

Comparing ray/src/util/xglaresrc.c (file contents):
Revision 1.3 by greg, Wed Mar 20 12:59:27 1991 UTC vs.
Revision 1.5 by greg, Mon Apr 22 13:41:50 1991 UTC

# Line 13 | Line 13 | static char SCCSid[] = "$SunId$ LBL";
13   #include "standard.h"
14   #include "view.h"
15   #include <X11/Xlib.h>
16 #include <X11/cursorfont.h>
16   #include <X11/Xutil.h>
17  
18   #define NSEG            30              /* number of segments per circle */
# Line 61 | Line 60 | char   *argv[];
60   init(name)                      /* set up vector drawing from pick */
61   char    *name;
62   {
63 +        extern Window   xfindwind();
64          XWindowAttributes       wa;
65        XEvent  xev;
65          XColor  xc;
66          XGCValues       gcv;
67                                          /* get the viewing parameters */
# Line 79 | Line 78 | char   *name;
78                                  progname);
79                  exit(1);
80          }
82        pickcursor = XCreateFontCursor(theDisplay, XC_target);
81                                          /* find our window */
82 <        while (XGrabPointer(theDisplay, rwind, True, ButtonPressMask,
83 <                        GrabModeAsync, GrabModeAsync, None, pickcursor,
84 <                        CurrentTime) != GrabSuccess)
85 <                sleep(2);
88 <        printf("%s: click mouse in \"%s\" display window\n", progname, name);
89 <        XNextEvent(theDisplay, &xev);
90 <        XUngrabPointer(theDisplay, CurrentTime);
91 <        if (((XButtonEvent *)&xev)->subwindow == None) {
92 <                fprintf(stderr, "%s: no window selected\n", progname);
82 >        gwind = xfindwind(theDisplay, rwind, name, 2);
83 >        if (gwind == None) {
84 >                fprintf(stderr, "%s: cannot find \"%s\" window\n",
85 >                                progname, name);
86                  exit(1);
87          }
88 <        gwind = ((XButtonEvent *)&xev)->subwindow;
96 <        XRaiseWindow(theDisplay, gwind);
88 >        XMapRaised(theDisplay, gwind);
89          XGetWindowAttributes(theDisplay, gwind, &wa);
90          sleep(4);
91          if (wa.width != xres || wa.height != yres) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines