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 2.2 by greg, Fri May 29 10:57:15 1992 UTC vs.
Revision 2.3 by greg, Fri May 29 15:42:49 1992 UTC

# Line 38 | Line 38 | static char SCCSid[] = "$SunId$ LBL";
38  
39   #define  ourscreen      DefaultScreen(ourdisplay)
40   #define  ourroot        RootWindow(ourdisplay,ourscreen)
41 #define  ourwhite       WhitePixel(ourdisplay,ourscreen)
42 #define  ourblack       BlackPixel(ourdisplay,ourscreen)
41  
42   #define  levptr(etype)  ((etype *)&currentevent)
43  
# Line 47 | Line 45 | static XEvent  currentevent;           /* current event */
45  
46   static int  ncolors = 0;                /* color table size */
47   static unsigned long  *pixval = NULL;   /* allocated pixels */
48 + static unsigned long  ourblack=0, ourwhite=1;
49  
50   static Display  *ourdisplay = NULL;     /* our display */
51  
# Line 98 | Line 97 | char  *name, *id;
97          if (    !XMatchVisualInfo(ourdisplay,ourscreen,
98                          24,TrueColor,&ourvinfo) &&
99                  !XMatchVisualInfo(ourdisplay,ourscreen,
100 <                        24,DirectColor,&ourvinfo)       )
100 >                        24,DirectColor,&ourvinfo)       ) {
101                  if (nplanes < 4) {
102                          stderr_v("not enough colors\n");
103                          return(NULL);
# Line 109 | Line 108 | char  *name, *id;
108                          stderr_v("unsupported visual type\n");
109                          return(NULL);
110                  }
111 +                ourblack = BlackPixel(ourdisplay,ourscreen);
112 +                ourwhite = WhitePixel(ourdisplay,ourscreen);
113 +        } else {
114 +                ourblack = 0;
115 +                ourwhite = ~0;
116 +        }
117          make_gmap(GAMMA);
118          /* open window */
119          ourwinattr.background_pixel = ourblack;
# Line 205 | Line 210 | int  xres, yres;
210                                                  /* get new command line */
211          if (comline != NULL)
212                  xt_close(comline);
213 <        comline = xt_open(ourdisplay,
214 <                        DefaultGC(ourdisplay,ourscreen),
210 <                        gwind, 0, gheight, gwidth, COMHEIGHT, 0, COMFN);
213 >        comline = xt_open(ourdisplay, gwind, 0, gheight,
214 >                        gwidth, COMHEIGHT, 0, ourblack, ourwhite, COMFN);
215          if (comline == NULL) {
216                  stderr_v("Cannot open command line window\n");
217                  quit(1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines