41 |
|
|
42 |
|
#define hashcolr(c) ((67*(c)[RED]+59*(c)[GRN]+71*(c)[BLU])%ncolors) |
43 |
|
|
44 |
< |
#define flush() while (XPending() > 0) getevent() |
44 |
> |
#define flush() XFlush() |
45 |
|
|
46 |
+ |
#define checkinp() while (QLength() > 0) getevent() |
47 |
+ |
|
48 |
|
#define levptr(etype) ((etype *)&thisevent) |
49 |
|
|
50 |
|
static char *clientname; /* calling client's name */ |
119 |
|
BlackPixel, WhitePixel, GXcopy); |
120 |
|
clientname = name; |
121 |
|
x_driver.inpready = 0; |
122 |
< |
errvec = x_errout; /* set error vectors */ |
121 |
< |
cmdvec = x_comout; |
122 |
> |
cmdvec = x_comout; /* set error vectors */ |
123 |
|
if (wrnvec != NULL) |
124 |
|
wrnvec = x_errout; |
125 |
|
return(&x_driver); |
129 |
|
static |
130 |
|
x_close() /* close our display */ |
131 |
|
{ |
132 |
< |
errvec = stderr_v; /* reset error vectors */ |
132 |
< |
cmdvec = NULL; |
132 |
> |
cmdvec = NULL; /* reset error vectors */ |
133 |
|
if (wrnvec != NULL) |
134 |
|
wrnvec = stderr_v; |
135 |
|
if (ourdisplay == NULL) |
203 |
|
pixval[ndx]); |
204 |
|
} |
205 |
|
if (nrays - lastflush >= WFLUSH) { |
206 |
< |
flush(); /* also checks for input */ |
206 |
> |
flush(); |
207 |
|
lastflush = nrays; |
208 |
|
} |
209 |
+ |
checkinp(); |
210 |
|
} |
211 |
|
|
212 |
|
|
228 |
|
{ |
229 |
|
if (comline != NULL) |
230 |
|
xt_puts(out, comline); |
231 |
< |
XFlush(); /* don't process events! */ |
231 |
> |
flush(); |
232 |
|
} |
233 |
|
|
234 |
|
|