--- ray/src/rt/x11.c 1990/03/08 10:09:58 1.12 +++ ray/src/rt/x11.c 1990/03/12 11:08:48 1.14 @@ -67,9 +67,9 @@ static GC ourgc = 0; /* our graphics context for dr static Colormap ourmap = 0; /* our color map */ -extern char *malloc(); +extern char *malloc(), *getcombuf(); -int x11_close(), x11_clear(), x11_paintr(), x11_errout(), +static int x11_close(), x11_clear(), x11_paintr(), x11_errout(), x11_getcur(), x11_comout(), x11_comin(), x11_flush(); static struct driver x11_driver = { @@ -175,9 +175,6 @@ static x11_clear(xres, yres) /* clear our display */ int xres, yres; { - /* destroy command line */ - if (comline != NULL) - xt_close(comline); /* check limits */ if (xres < MINWIDTH) xres = MINWIDTH; @@ -193,7 +190,16 @@ int xres, yres; sleep(2); /* wait for window manager */ XSync(ourdisplay, 1); /* discard input */ } + XClearWindow(ourdisplay, gwind); + /* reinitialize color table */ + if (ourvisual->class == PseudoColor) + if (getpixels() == 0) + stderr_v("cannot allocate colors\n"); + else + new_ctab(ncolors); /* get new command line */ + if (comline != NULL) + xt_close(comline); comline = xt_open(ourdisplay, DefaultGC(ourdisplay,ourscreen), gwind, 0, gheight, gwidth, COMHEIGHT, 0, COMFN); @@ -202,14 +208,6 @@ int xres, yres; quit(1); } XSelectInput(ourdisplay, comline->w, ExposureMask); - /* clear graphics window */ - XClearWindow(ourdisplay, gwind); - /* reinitialize color table */ - if (ourvisual->class == PseudoColor) - if (getpixels() == 0) - stderr_v("cannot allocate colors\n"); - else - new_ctab(ncolors); /* remove earmuffs */ XSelectInput(ourdisplay, gwind, StructureNotifyMask|ExposureMask|KeyPressMask|ButtonPressMask); @@ -250,7 +248,7 @@ static x11_comin(inp, prompt) /* read in a command line */ char *inp, *prompt; { - int x11_getc(), x11_comout(); + extern int x11_getc(); if (prompt != NULL) if (fromcombuf(inp, &x11_driver))