|
From: <tim...@en...> - 2007-06-06 15:07:02
|
Hi! I'm still thinking about wxt-on-Mac, and while there is one major issue still in the works (the last one I mailed about, i.e. the single-threaded vs. two-threaded), I've come to think about the "persist" behaviour. Let me remind you that the purpose of "persist" is to keep plot windows open when gnuplot exits. Currently, I implemented this on Unix/wxGtk by forking at exit-time. The connection to the X server is preserved, since it's a file descriptor, and the child process keeps running the GUI loop in the background. With wxMac (native wxWidgets on MacOS), this doesn't work: as soon as the parent process exits, the windows disappear. The only solution I can think of (apart from recreating the windows one by one in the child process, which would cause an obvious flickering) is to fork before windows are created, i.e. *immediately* when gnuplot *starts*. Then have the parent process do nothing but wait for the child to tell him to exit. The only drawback I can think of is that gnuplot has to know it has to fork when it's launched, so the "persist" setting must be given on gnuplot command-line. Other places where it can be set currently, in 'set wxt persist' and in wxt configuration dialog, have to be removed. The corresponding patch is attached. I'd like those of you who use "persist" (or understand what it was meant for) to comment. As for me, I only know one user, Maxima, and the proposed patch should satisfy it. Best regards, Timothée |