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.16 by greg, Wed Jul 18 12:25:07 1990 UTC vs.
Revision 1.18 by greg, Fri Apr 19 15:02:54 1991 UTC

# Line 21 | Line 21 | static char SCCSid[] = "$SunId$ LBL";
21   #include  "color.h"
22   #include  "driver.h"
23   #include  "x11twind.h"
24 + #include  "x11icon.h"
25  
26   #define GAMMA           2.2             /* exponent for color correction */
27  
# Line 45 | Line 46 | static char SCCSid[] = "$SunId$ LBL";
46   static XEvent  currentevent;            /* current event */
47  
48   static int  ncolors = 0;                /* color table size */
49 < static int  *pixval = NULL;             /* allocated pixels */
49 > static unsigned long  *pixval = NULL;   /* allocated pixels */
50  
51   static Display  *ourdisplay = NULL;     /* our display */
52  
# Line 129 | Line 130 | char  *name, *id;
130          /* create a cursor */
131          pickcursor = XCreateFontCursor(ourdisplay, XC_diamond_cross);
132          ourgc = XCreateGC(ourdisplay, gwind, 0, NULL);
133 <        ourxwmhints.flags = InputHint;
133 >        ourxwmhints.flags = InputHint|IconPixmapHint;
134          ourxwmhints.input = True;
135 +        ourxwmhints.icon_pixmap = XCreateBitmapFromData(ourdisplay,
136 +                        gwind, x11icon_bits, x11icon_width, x11icon_height);
137          XSetWMHints(ourdisplay, gwind, &ourxwmhints);
138          oursizhints.min_width = MINWIDTH;
139          oursizhints.min_height = MINHEIGHT+COMHEIGHT;
# Line 138 | Line 141 | char  *name, *id;
141          XSetNormalHints(ourdisplay, gwind, &oursizhints);
142          XSelectInput(ourdisplay, gwind, ExposureMask);
143          XMapWindow(ourdisplay, gwind);
144 <        XWindowEvent(ourdisplay, gwind, ExposureMask, levptr(XExposeEvent));
144 >        XWindowEvent(ourdisplay, gwind, ExposureMask, levptr(XEvent));
145          gwidth = levptr(XExposeEvent)->width;
146          gheight = levptr(XExposeEvent)->height - COMHEIGHT;
147          x11_driver.xsiz = gwidth < MINWIDTH ? MINWIDTH : gwidth;
# Line 351 | Line 354 | loop:
354          for (ncolors = ourvisual->map_entries;
355                          ncolors > ourvisual->map_entries/3;
356                          ncolors = ncolors*.937) {
357 <                pixval = (int *)malloc(ncolors*sizeof(int));
357 >                pixval = (unsigned long *)malloc(ncolors*sizeof(unsigned long));
358                  if (pixval == NULL)
359                          return(ncolors = 0);
360                  if (XAllocColorCells(ourdisplay,ourmap,0,NULL,0,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines