100 |
|
XSizeHints oursizhints; |
101 |
|
/* set quadtree globals */ |
102 |
|
qtDepthEps = 0.02; |
103 |
< |
qtMinNodesiz = 1; |
103 |
> |
qtMinNodesiz = 2; |
104 |
|
/* open display server */ |
105 |
|
ourdisplay = XOpenDisplay(NULL); |
106 |
|
if (ourdisplay == NULL) |
384 |
|
{ |
385 |
|
VIEW nv; |
386 |
|
double d; |
387 |
< |
register int i; |
387 |
> |
register int i, li; |
388 |
|
/* start with old view */ |
389 |
|
copystruct(&nv, &odev.v); |
390 |
|
/* change view direction */ |
391 |
|
if (move) { |
392 |
< |
register RLEAF *lp; |
393 |
< |
if ((lp = qtFindLeaf(dx, dy)) == NULL) |
392 |
> |
if ((li = qtFindLeaf(dx, dy)) < 0) |
393 |
|
return(0); /* not on window */ |
394 |
|
for (i = 0; i < 3; i++) |
395 |
< |
nv.vdir[i] = lp->wp[i] - nv.vp[i]; |
395 |
> |
nv.vdir[i] = qtL.wp[li][i] - nv.vp[i]; |
396 |
|
} else { |
397 |
|
if (viewray(nv.vp, nv.vdir, &odev.v, |
398 |
|
(dx+.5)/odev.hres, (dy+.5)/odev.vres) < -FTINY) |
431 |
|
unsigned int statemask; |
432 |
|
|
433 |
|
qtMinNodesiz = 16; /* for quicker update */ |
434 |
+ |
qtCompost(50); |
435 |
|
|
436 |
|
do { |
437 |
|
if (!XQueryPointer(ourdisplay, gwind, &rootw, &childw, |
440 |
|
|
441 |
|
if (!moveview(wx, odev.vres-1-wy, MOVDIR(whichbutton))) |
442 |
|
sleep(1); |
443 |
+ |
else |
444 |
+ |
qtUpdate(); |
445 |
|
|
446 |
|
} while (!XCheckMaskEvent(ourdisplay, |
447 |
|
ButtonReleaseMask, levptr(XEvent))); |