diff --git a/ChangeLog b/ChangeLog index 1c898b16a..0e5eeedf1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-04-02 Robert Larice + * src/frontend/plotting/x11.c : + extend the fix from 2011-02-11 + for other ways of closing a plot window. + in response to + http://sourceforge.net/tracker/?func=detail&atid=423915&aid=3263437&group_id=38962 + 2011-03-24 Dietmar Warning * xspice/icm/GNUmakefile.in: sun cc needs modified dependency flags (-xMD) diff --git a/src/frontend/plotting/x11.c b/src/frontend/plotting/x11.c index 31c066d30..85ffe8517 100644 --- a/src/frontend/plotting/x11.c +++ b/src/frontend/plotting/x11.c @@ -320,11 +320,7 @@ static void handle_wm_messages(Widget w, XtPointer client_data, XEvent *event, B && event->xclient.message_type == atom_wm_protocols && (Atom) event->xclient.data.l[0] == atom_wm_delete_window) { - /* Iplots are done asynchronously */ - DEVDEP(graph).isopen = 0; - /* MW. Not sure but DestroyGraph might free() to much - try Xt...() first */ - XtDestroyWidget(DEVDEP(graph).shell); - DestroyGraph(graph->graphid); + RemoveWindow(graph); } } @@ -877,14 +873,7 @@ killwin(Widget w, caddr_t client_data, caddr_t call_data) NG_IGNORE(call_data); NG_IGNORE(w); - /* Iplots are done asynchronously */ - DEVDEP(graph).isopen = 0; - /* MW. Not sure but DestroyGraph might free() to much - try Xt...() first */ - XtDestroyWidget(DEVDEP(graph).shell); - if (graph == currentgraph) - currentgraph = FindGraph(graph->graphid - 1); - DestroyGraph(graph->graphid); - + RemoveWindow(graph); } /* called from postcoms.c @@ -897,6 +886,8 @@ RemoveWindow(GRAPH *graph) DEVDEP(graph).isopen = 0; /* MW. Not sure but DestroyGraph might free() to much - try Xt...() first */ XtDestroyWidget(DEVDEP(graph).shell); + if (graph == currentgraph) + currentgraph = FindGraph(graph->graphid - 1); DestroyGraph(graph->graphid); }