|
From: Ethan A M. <merritt@u.washington.edu> - 2006-06-04 22:35:52
|
On Sunday 04 June 2006 08:54 am, Ethan A Merritt wrote: > It's the same old problem: gnuplot mixes the input streams from the > keyboard and the current terminal into a single queue. Thus both > terminal events and keyboard input are read via term->waitforinput(). > If you change the terminal, you change the input routine and no longer > read events from the previous terminal. =20 On the other hand, the only terminals that implement term->waitforinput seem to be x11, wxt, and ggi. I think we can ignore ggi, if not delete it from the tree altogether. And other than for debugging/comparison, I=20 can't think why you would routinely be switching back and forth between x11 and wxt. So the real issue is when you are using either x11 or wxt, but shift temporarily to a different terminal for printing. Perhaps the answer is that in such a case gnuplot could continue to channel input through the previous driver's waitforinput() routine. I think maybe this can be done in two steps: - When a new terminal is set, we conditionally set a new variable if (term->waitforinput) current_waitforinput =3D term->waitforinput; - Replace existing references to term->waitforinput() by the new pointer current_waitforinput. I found 3 occurrances in command.c and another 3 in readline.c I have placed a small patch on SourceForge that does this. It seems to work for x11, with a few glitches that appear minor but may turn out to be profound. However, if the terminal is set to wxt and than to something else, this patch causes a lot of binary junk to spew back to the console terminal window. I don't understand this at all. Timoth=E9e, can you have a look to see why this happens? =2D-=20 Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |