On Monday, May 10, 2010 at 09:50:28 (-0700) Alan W. Irwin writes: > On 2010-05-10 13:55+0100 Andrew Ross wrote: > > > On Fri, May 07, 2010 at 09:03:59PM -0400, chm wrote: > >> On 5/7/2010 1:03 PM, SourceForge.net wrote: > >>> Summary: -dev xwin shows fatal error when window closed > >>> > >>> Initial Comment: > >>> For -dev xwin, when you close the window by alt+F4 or other equivalents, > >>> the following fatal error message is the result: > >>> > >>> XIO: fatal IO error 11 (Resource temporarily unavailable) on X server > >>> > >>> This fatal error can be disruptive to certain environments (e.g., lisp) > >>> and should be replaced by a smooth exit from PLplot. as occurs under > >>> these same circumstances for -dev qtwidget and -dev wxwidgets. > >>> > >>> > >> > >> I took a look at xwin.c and it appears that a number of the X11 > >> calls do not have check for error returns. Perhaps this is the > >> origin of the problem. > > > > The underlying problem is that to detect pressing of the close button in > > the top right of a X window you need to explicitly ask for it to be > > forwarded on, and then handle the consequences yourself. I've now > > committed a change to do this. The event handling in the xwin driver is > > not simple and so I would appreciate people robustly testing these > > changes to make sure I've not broken anything else. > > Thanks very much for taking on this tricky fix. > > I tried a lot of variations of x01c with -xor and -locate with various ways > of closing the window and all was well. I also tried multipage examples and > all seemed well. Finally, I tried -dev tk (which depends on -dev xwin > code) using the command > > examples/c/x01c -dev tk > > and I get a hang from alt+F4 or any other method of closing the window. > (BTW, to set up all the prerequisites for that command you can > use "make -j4 test_c_tk" or "make -j4 all".) > > I am not sure whether this -dev tk hang is a long-standing problem or the > result of your recent change because up to now I have rarely tested closing > the window, but it would be great if you would be willing to take a look.
I'm not sure about the tk driver status, as it's been a long time since I used it substantially. But I do use the plframe binding, a lot. And I fear the bug fix as implemented will be incompatible with that. Here's the situation: a user with a plplot-enhanced wish (the one we build in the package is named plserver) launches a bunch of windows. Then the user clicks on the go-away button. The xwin driver calls plexit() and the whole application shuts down. Not good. It should just exit that stream. I haven't verified this experimentally, but an easy way to do so is using examples/tk/tk03. It uses a stock plserver for plotting (you can change @plserver_LOCATION@ to be just "." and run from the directory plserver is sitting in). Click on the "Open new" button to open a 2nd plframe. Then close it with the goaway button. Only that window, and not the first, should shut down. -- Maurice LeBrun ------------------------------------------------------------------------------ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel