175 |
|
x11_clear(xres, yres) /* clear our display */ |
176 |
|
int xres, yres; |
177 |
|
{ |
178 |
– |
/* destroy command line */ |
179 |
– |
if (comline != NULL) |
180 |
– |
xt_close(comline); |
178 |
|
/* check limits */ |
179 |
|
if (xres < MINWIDTH) |
180 |
|
xres = MINWIDTH; |
190 |
|
sleep(2); /* wait for window manager */ |
191 |
|
XSync(ourdisplay, 1); /* discard input */ |
192 |
|
} |
193 |
+ |
XClearWindow(ourdisplay, gwind); |
194 |
+ |
/* reinitialize color table */ |
195 |
+ |
if (ourvisual->class == PseudoColor) |
196 |
+ |
if (getpixels() == 0) |
197 |
+ |
stderr_v("cannot allocate colors\n"); |
198 |
+ |
else |
199 |
+ |
new_ctab(ncolors); |
200 |
|
/* get new command line */ |
201 |
+ |
if (comline != NULL) |
202 |
+ |
xt_close(comline); |
203 |
|
comline = xt_open(ourdisplay, |
204 |
|
DefaultGC(ourdisplay,ourscreen), |
205 |
|
gwind, 0, gheight, gwidth, COMHEIGHT, 0, COMFN); |
208 |
|
quit(1); |
209 |
|
} |
210 |
|
XSelectInput(ourdisplay, comline->w, ExposureMask); |
205 |
– |
/* clear graphics window */ |
206 |
– |
XClearWindow(ourdisplay, gwind); |
207 |
– |
/* reinitialize color table */ |
208 |
– |
if (ourvisual->class == PseudoColor) |
209 |
– |
if (getpixels() == 0) |
210 |
– |
stderr_v("cannot allocate colors\n"); |
211 |
– |
else |
212 |
– |
new_ctab(ncolors); |
211 |
|
/* remove earmuffs */ |
212 |
|
XSelectInput(ourdisplay, gwind, |
213 |
|
StructureNotifyMask|ExposureMask|KeyPressMask|ButtonPressMask); |