18 |
|
|
19 |
|
#include "x11icon.h" |
20 |
|
|
21 |
+ |
#ifndef RAYQLEN |
22 |
+ |
#define RAYQLEN 50000 /* max. rays to queue before flush */ |
23 |
+ |
#endif |
24 |
+ |
|
25 |
|
#ifndef FEQ |
26 |
|
#define FEQ(a,b) ((a)-(b) <= FTINY && (a)-(b) >= -FTINY) |
27 |
|
#endif |
85 |
|
for (cp = tail; *cp && *cp != '.'; cp++) |
86 |
|
; |
87 |
|
if (cp-tail == 3 && !strncmp(tail, "x11", 3)) |
88 |
< |
return(TM_F_CAMERA); |
88 |
> |
return(TM_F_CAMERA|TM_F_NOSTDERR); |
89 |
|
if (cp-tail == 4 && !strncmp(tail, "x11h", 4)) |
90 |
< |
return(TM_F_HUMAN); |
90 |
> |
return(TM_F_HUMAN|TM_F_NOSTDERR); |
91 |
|
error(USER, "illegal driver name"); |
92 |
|
} |
93 |
|
|
174 |
|
dev_input(); /* sets size and view angles */ |
175 |
|
/* allocate our leaf pile */ |
176 |
|
if (!qtAllocLeaves(DisplayWidth(ourdisplay,ourscreen) * |
177 |
< |
DisplayHeight(ourdisplay,ourscreen) / |
178 |
< |
(qtMinNodesiz*qtMinNodesiz))) |
177 |
> |
DisplayHeight(ourdisplay,ourscreen) * 3 / |
178 |
> |
(qtMinNodesiz*qtMinNodesiz*2))) |
179 |
|
error(SYSTEM, "insufficient memory for leaf storage"); |
180 |
|
odev.name = id; |
181 |
|
odev.ifd = ConnectionNumber(ourdisplay); |
199 |
|
} |
200 |
|
|
201 |
|
|
202 |
+ |
|
203 |
+ |
dev_clear() /* clear our quadtree */ |
204 |
+ |
{ |
205 |
+ |
qtCompost(100); |
206 |
+ |
if (ncolors > 0) |
207 |
+ |
new_ctab(ncolors); |
208 |
+ |
rayqleft = 0; /* hold off update */ |
209 |
+ |
} |
210 |
+ |
|
211 |
+ |
|
212 |
|
int |
213 |
|
dev_view(nv) /* assign new driver view */ |
214 |
|
VIEW *nv; |
292 |
|
dev_flush() /* flush output */ |
293 |
|
{ |
294 |
|
qtUpdate(); |
295 |
+ |
rayqleft = RAYQLEN; |
296 |
|
return(XPending(ourdisplay)); |
297 |
|
} |
298 |
|
|
468 |
|
static BYTE gridrgb[3] = {0x0, 0xff, 0xff}; |
469 |
|
unsigned long pixel; |
470 |
|
|
471 |
< |
if (!mapped || odev.v.type != VT_PER) |
471 |
> |
if (!mapped) |
472 |
|
return; |
473 |
|
if (ncolors > 0) |
474 |
|
pixel = pixval[get_pixel(gridrgb, xnewcolr)]; |
614 |
|
if (ncolors > 0) |
615 |
|
new_ctab(ncolors); |
616 |
|
inpresflags |= DFL(DC_REDRAW); /* resend values from server */ |
617 |
+ |
rayqleft = 0; /* hold off update */ |
618 |
|
return; |
619 |
|
case 'K': /* kill rtrace process(es) */ |
620 |
|
inpresflags |= DFL(DC_KILL); |