|
From: Tatsuro M. <tma...@ya...> - 2010-01-27 11:29:31
|
> You claim there (message by Tatsuro MATSUOKA-2 Dec 11, 2009; 09:40am) that
> the reason is that "pause mouse" does not work on gnuplot.exe + Windows
> terminal. It seems I missed this test yesterday. Isn't this related to
> another bug, that gnuplot.exe running under Wine freezes after the first
> entered command?
>
>
> I've tried it:
>
> With "set term windows":
> - pause mouse key; show var
> pause mouse; show var
> pause mouse any; show var
> ... in wgnuplot{_pipes}.exe: work correctly
> ... in gnuplot.exe: MOUSE_ variables are filled correctly, but <enter> has
> to be pressed in the command window to return back to the command
> prompt
> - pause mouse button{1-3}; show var
> ... Wrong: it terminates on any mouse button
>
> With "set term wxt":
> - all "pause mouse" commands work correctly in gnuplot.exe
> - all "pause mouse" commands have a problem in wgnuplot{_pipes}.exe:
> MOUSE_ variables are filled correctly, but <enter> has to be pressed
> in the command window to return back to the command prompt
>
> It seems the "hit <enter>" bug is in windows+gnuplot.exe and in
> wxt+wgnuplot.exe combination.
>
>
> Is WIN_IPC used correctly in both cases? Isn't somewhere missing an #ifdef?
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();
}
}
}
#if defined(_Windows) && !defined(WGP_CONSOLE)
This gives different behaviors of pause mouse between gnuplot.exe and wgnuplot{_pipes}.exe.
For gnuplot.exe, term->waitforinput is called but for wgnuplot{_pipes}.exe, the above code is used for
wgnuplot.exe. It is clear that the code for wgnuplot{_pipes}.exe does not consider wxt terminal
because we cannot get wxt window information cannot be obtained by 'graphwin.hWndGraph'.
I , at the moment, have any good idea to treat them.
For term->waitforinput, I have compared
x11_X11_waitforinput() in term/x11.trm and wxt_waitforinput() in src/wxterminal/wxt_gui.cpp are very
different each other. I think that treatment of x11 is better because it gives message of 'Mousing
not active' if x11 graph window is not active.
I think that it is better to unify the behavior for interactive terminals as possible.
Regards
Tatsuro
--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/
|