--- ray/src/hd/rhd_x11.c 1997/11/21 13:35:58 3.4 +++ ray/src/hd/rhd_x11.c 1997/11/25 11:21:50 3.8 @@ -212,6 +212,7 @@ int dev_input() /* get X11 input */ { inpresflags = 0; + do getevent(); @@ -431,7 +432,6 @@ XButtonPressedEvent *ebut; unsigned int statemask; qtMinNodesiz = 16; /* for quicker update */ - qtCompost(50); do { if (!XQueryPointer(ourdisplay, gwind, &rootw, &childw, @@ -451,6 +451,7 @@ XButtonPressedEvent *ebut; wx = levptr(XButtonReleasedEvent)->x; wy = levptr(XButtonReleasedEvent)->y; moveview(wx, odev.vres-1-wy, MOVDIR(whichbutton)); + dev_flush(); } qtMinNodesiz = oldnodesiz; /* restore quadtree resolution */ @@ -474,17 +475,34 @@ register XKeyPressedEvent *ekey; case 'H': /* turn off height motion lock */ headlocked = 0; return; - case CTRL('Z'): + case CTRL('S'): case 'p': /* pause computation */ inpresflags |= DEV_WAIT; return; + case 'v': /* spit out view */ + fputs(VIEWSTR, stderr); + fprintview(&odev.v, stderr); + fputc('\n', stderr); + return; + case CTRL('Q'): case '\n': - case '\r': /* release */ + case '\r': /* resume computation */ + inpresflags |= DEV_RESUME; return; - case CTRL('R'): /* redraw */ + case CTRL('R'): /* redraw screen */ if (ncolors > 0) new_ctab(ncolors); qtRedraw(0, 0, odev.hres, odev.vres); + return; + case CTRL('L'): /* refresh from server */ + if (inpresflags & DEV_REDRAW) + return; + XClearWindow(ourdisplay, gwind); + XFlush(ourdisplay); + qtCompost(100); /* unload the old tree */ + if (ncolors > 0) + new_ctab(ncolors); + inpresflags |= DEV_REDRAW; /* resend values from server */ return; case CTRL('D'): case 'Q':