From: Ethan M. <merritt@u.washington.edu> - 2004-06-17 21:05:02
|
On Thursday 17 June 2004 05:26 am, Petr Mikulik wrote: > > The problem is when "pause mouse" is issued by an application using > gnuplot as its front end. Particular case: In Octave, I use ginput.m > (see gnuplot web page for the script) to receive given number of point > coordinates. Then, it send "pause mouse" to gnuplot and reads one > coordinate after another using fifo. If you close gnuplot in between, > then the reader gets blocked -- you will need "Ctrl-C" in your driving > application, or to kill gnuplot, or like that. > > Do you have an idea how to avoid this block? I have added a check in gplt_x11 for the DestroyNotify event, which should be generated any time a plot window is closed. If it is the current plot window, then gnuplot_x11 passes the information on to gnuplot via the mousing pipe using the existing GE_reset mechanism. On the gnuplot side I have added code to terminate the paused_for_mouse state whenever a GE_reset event is seen. Please let me know if this change resolves your problems with running gnuplot via a script. There are ways to close a window that bypass this mechanism (killing gnuplot_x11 from the command line is one of them), but I think this change handles the normal cases. -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |