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

Comparing ray/src/hd/rhd_x11.c (file contents):
Revision 3.31 by gwlarson, Fri Dec 18 11:56:10 1998 UTC vs.
Revision 3.32 by greg, Sat Feb 22 02:07:24 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1998 Silicon Graphics, Inc. */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ SGI";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * X11 driver for holodeck display.
6   * Based on rview driver.
# Line 13 | Line 10 | static char SCCSid[] = "$SunId$ SGI";
10   #include  <X11/Xlib.h>
11   #include  <X11/cursorfont.h>
12   #include  <X11/Xutil.h>
13 + #include  <time.h>
14   #include "rhd_qtree.h"
15   #include  "x11icon.h"
16  
# Line 377 | Line 375 | loop:
375                          return(ncolors = 0);
376                  if (XAllocColorCells(ourdisplay,ourmap,0,NULL,0,pixval,ncolors))
377                          break;
378 <                free((char *)pixval);
378 >                free((void *)pixval);
379                  pixval = NULL;
380          }
381          if (pixval == NULL) {
# Line 412 | Line 410 | freepixels()                           /* free our pixels */
410          if (ncolors == 0)
411                  return;
412          XFreeColors(ourdisplay,ourmap,pixval,ncolors,0L);
413 <        free((char *)pixval);
413 >        free((void *)pixval);
414          pixval = NULL;
415          ncolors = 0;
416          if (ourmap != DefaultColormap(ourdisplay,ourscreen))
# Line 611 | Line 609 | XButtonPressedEvent    *ebut;
609  
610  
611   static
612 + waitabit()                              /* pause a moment */
613 + {
614 +        struct timespec ts;
615 +        ts.tv_sec = 0;
616 +        ts.tv_nsec = 5000000;
617 +        nanosleep(&ts, NULL);
618 + }
619 +
620 +
621 + static
622   getmove(ebut)                           /* get view change */
623   XButtonPressedEvent     *ebut;
624   {
# Line 626 | Line 634 | XButtonPressedEvent    *ebut;
634  
635          while (!XCheckMaskEvent(ourdisplay,
636                          ButtonReleaseMask, levptr(XEvent))) {
637 <
637 >                waitabit();
638                  if (!XQueryPointer(ourdisplay, gwind, &rootw, &childw,
639                                  &rootx, &rooty, &wx, &wy, &statemask))
640                          break;          /* on another screen */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines