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

Comparing ray/src/rt/x11.c (file contents):
Revision 1.9 by greg, Fri Mar 2 10:08:01 1990 UTC vs.
Revision 1.10 by greg, Fri Mar 2 15:05:26 1990 UTC

# Line 84 | Line 84 | char  *name, *id;
84   {
85          int  nplanes;
86          XVisualInfo  ourvinfo;
87 +        XSetWindowAttributes    ourwinattr;
88          XWMHints  ourxwmhints;
89  
90          ourdisplay = XOpenDisplay(NULL);
# Line 108 | Line 109 | char  *name, *id;
109          }
110          ourvisual = ourvinfo.visual;
111          make_gmap(GAMMA);
111        /* create a cursor */
112        pickcursor = XCreateFontCursor (ourdisplay, XC_diamond_cross);
112          /* open window */
113 <        gwind = XCreateSimpleWindow(ourdisplay, ourroot, 0, 0,
113 >        ourwinattr.background_pixel = ourwhite;
114 >        ourwinattr.border_pixel = ourblack;
115 >        gwind = XCreateWindow(ourdisplay, ourroot, 0, 0,
116                  DisplayWidth(ourdisplay,ourscreen)-2*BORWIDTH,
117                  DisplayHeight(ourdisplay,ourscreen)-2*BORWIDTH,
118 <                BORWIDTH, ourblack, ourwhite);
118 >                BORWIDTH, nplanes, InputOutput, ourvisual,
119 >                CWBackPixel|CWBorderPixel, &ourwinattr);
120          if (gwind == 0) {
121                  stderr_v("cannot create window\n");
122                  return(NULL);
123          }
124          XStoreName(ourdisplay, gwind, id);
125 +        /* create a cursor */
126 +        pickcursor = XCreateFontCursor(ourdisplay, XC_diamond_cross);
127          ourgc = XCreateGC(ourdisplay, gwind, 0, NULL);
128          ourxwmhints.flags = InputHint;
129          ourxwmhints.input = True;
# Line 221 | Line 225 | int  xmin, ymin, xmax, ymax;
225   static
226   x11_flush()                     /* flush output */
227   {
228 <        if (ncolors <= 0 && ourvisual->class != TrueColor)      /* dummy */
225 <                XFillRectangle(ourdisplay, gwind, ourgc, 0, 0, 1 ,1);
228 >        XNoOp(ourdisplay);
229          while (XPending(ourdisplay) > 0)
230                  getevent();
231   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines