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.38 by greg, Fri Jan 7 20:33:02 2005 UTC vs.
Revision 3.42 by schorsch, Wed Jun 7 17:52:04 2006 UTC

# Line 190 | Line 190 | dev_open(                      /* initialize X11 driver */
190                                          /* set window manager hints */
191          ourxwmhints.flags = InputHint|IconPixmapHint;
192          ourxwmhints.input = True;
193 <        ourxwmhints.icon_pixmap = XCreateBitmapFromData(ourdisplay,
194 <                        gwind, x11icon_bits, x11icon_width, x11icon_height);
193 >        ourxwmhints.icon_pixmap = XCreateBitmapFromData(ourdisplay, gwind,
194 >                        (char *)x11icon_bits, x11icon_width, x11icon_height);
195          XSetWMHints(ourdisplay, gwind, &ourxwmhints);
196          oursizhints.min_width = MINWIDTH;
197          oursizhints.min_height = MINHEIGHT;
# Line 295 | Line 295 | dev_view(                      /* assign new driver view */
295  
296   extern void
297   dev_section(            /* add octree for geometry rendering */
298 <        char    *ofn
298 >        char    *gfn,
299 >        char    *pfn
300   )
301   {
302          /* unimplemented */
# Line 640 | Line 641 | getframe(                              /* get focus frame */
641   )
642   {
643          int     startx = ebut->x, starty = ebut->y;
644 <        int     endx, endy;
645 <
644 >        int     endx, endy, midx, midy;
645 >        FVECT   v1;
646 >        int     li;
647 >                                        /* get mouse drag */
648          XMaskEvent(ourdisplay, ButtonReleaseMask, levptr(XEvent));
649          endx = levptr(XButtonReleasedEvent)->x;
650          endy = levptr(XButtonReleasedEvent)->y;
651 <        if ((endx == startx) | (endy == starty)) {
652 <                XBell(ourdisplay, 0);
651 >        midx = (startx + endx) >> 1;
652 >        midy = (starty + endy) >> 1;
653 >                                        /* set focus distance */
654 >        if ((li = qtFindLeaf(midx, midy)) < 0)
655 >                return;                 /* not on window */
656 >        VCOPY(v1, qtL.wp[li]);
657 >        odev.v.vdist = sqrt(dist2(odev.v.vp, v1));
658 >                                        /* set frame for rendering */
659 >        if ((endx == startx) | (endy == starty))
660                  return;
651        }
661          if (endx < startx) {register int c = endx; endx = startx; startx = c;}
662          if (endy < starty) {register int c = endy; endy = starty; starty = c;}
663          sprintf(odev_args, "%.3f %.3f %.3f %.3f",

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines