|
From: Ethan A M. <sf...@us...> - 2015-08-25 19:05:15
|
On Tuesday, 25 August, 2015 14:22:05 Allin Cottrell wrote:
> On Tue, 25 Aug 2015, sfeam wrote:
> > The single- and multi- threaded versions use a different section of
> > code in the routine wxt_gui.cpp: wxt_waitforinput()
> > It sounds like there is some tweak needed for the single-threaded
> > code block so that it doesn't exit if "pause mouse close" is active.
> >
> > You could try adding a check for
> > if (!paused_for_mouse)
> > or maybe it would need to be
> > if ((paused_for_mouse & PAUSE_WINCLOSE) != 0)
> >
> > before breaking from the loop that starts at line 3869.
> > But I'm not sure... that might cause it to hang in other
> > circumstances.
>
> Thanks for the hint, I'll give it a try.
>
> In the meantime, something related: I tried hooking up all relevant
> pipes via g_spawn (gnuplot's stdin to pipe in the script, and
> gnuplot's stdout to read messages). My idea was, after "pause mouse
> close" get gnuplot to print "done" (with print set to "-"). So when we
> read "done", close all pipes and gnuplot should shut down.
>
> This works fine on Linux, but not on OS X: "done" never gets printed,
> or in other words closing the wxt window does not trigger "close" so
> far as pause mouse is concerned. The pause is either non-existent or
> permanent 8-/
Does it make any persist/nopersist make any difference?
Try activating the FPRINTF in wxt_gui.cpp
void wxtFrame::OnClose( wxCloseEvent& event )
{
FPRINTF((stderr,"OnClose\n"));
to monitor whether the window close event is being delivered to
the program.
Ethan
|