|
From: Tatsuro M. <tma...@ya...> - 2015-08-28 10:30:58
|
>Patch 2 prevents loss of a character from the input stream after
>waiting for a mouse click.
>I am not sure if this is needed or even safe on Windows.
>
>--- a/src/wxterminal/wxt_gui.cpp 2015-07-13 10:54:44.000000000 -0700
>+++ b/src/wxterminal/wxt_gui.cpp 2015-08-27 12:26:12.000000000 -0700
>@@ -3716,7 +3716,8 @@ bool wxt_exec_event(int type, int mx, in
>event.winid = id;
>#if defined(WXT_MONOTHREADED) || defined(_Windows)
>- wxt_process_one_event(&event);
>+ if (wxt_process_one_event(&event))
>+ ungetc('\n',stdin); /* FIXME: OK on Windows? */
>return true;
>#else
>if (!wxt_handling_persist)
>
I have complied patch 2 attached wxt_gui.cpp.
Compile itself have passed on gnuplot.exe and wgnuplot.exe.
However
ungetc('\n',stdin);
perhaps only works on console mode (gnuplot.exe) (untested.)
The function ungetc is not redefined in wtext.h.
For wgnuplot.exe, special treatment might be required but
I do not have ability on this matter.
Tatsuro
|