|
From: Petr M. <mi...@ph...> - 2010-01-27 15:31:03
|
> In my idea, pause mouse issues lies on the following the code in command.c
>
> #if defined(_Windows) && !defined(WGP_CONSOLE)
> if (paused_for_mouse && !graphwin.hWndGraph) {
> if (interactive) { /* cannot wait for Enter in a non-interactive session without the graph window */
> char tmp[512];
> if (buf) fprintf(stderr,"%s\n", buf);
> fgets(tmp, 512, stdin); /* graphical window not yet initialized, wait for any key here */
> }
> } else { /* pausing via graphical windows */
> int tmp = paused_for_mouse;
> if (buf && paused_for_mouse) fprintf(stderr,"%s\n", buf);
> if (!Pause(buf)) {
> if (!tmp) {
> bail_to_command_line();
> } else {
> if (!graphwin.hWndGraph)
> bail_to_command_line();
> }
> }
> }
The code above is a correct code for the Windows terminal, therefore there
must be
#if defined(_Windows)
and not
#if defined(_Windows) && !defined(WGP_CONSOLE)
Then all "pause mouse" commands work correctly in gnuplot.exe as well as in
wgnuplot.exe.
The test
!graphwin.hWndGraph
is there because of "pause mouse" issued before any "{s}plot" command.
If WX is the current terminal under windows, then the pausing code with
waitforinput() has to be used instead. Will the (untested) enclosed patch
work?
---
PM |