Fix Bug #624 - "Destroy All Fails with an Open Plot Window" for X11.
Move XftDrawDestroy() call to a point where the window still exists.
This commit is contained in:
parent
f83c89cce7
commit
2233e2f825
|
|
@ -1189,6 +1189,9 @@ void RemoveWindow(GRAPH *graph)
|
||||||
DEVDEP(graph).isopen = 0;
|
DEVDEP(graph).isopen = 0;
|
||||||
/* MW. Not sure but DestroyGraph might free() too much - try Xt...() first */
|
/* MW. Not sure but DestroyGraph might free() too much - try Xt...() first */
|
||||||
XtUnmapWidget(DEVDEP(graph).shell);
|
XtUnmapWidget(DEVDEP(graph).shell);
|
||||||
|
#ifdef HAVE_LIBXFT
|
||||||
|
XftDrawDestroy(DEVDEP(graph).draw);
|
||||||
|
#endif
|
||||||
XtDestroyWidget(DEVDEP(graph).shell);
|
XtDestroyWidget(DEVDEP(graph).shell);
|
||||||
#ifndef HAVE_LIBXFT
|
#ifndef HAVE_LIBXFT
|
||||||
XFreeFont(display, DEVDEP(graph).font);
|
XFreeFont(display, DEVDEP(graph).font);
|
||||||
|
|
@ -1198,7 +1201,6 @@ void RemoveWindow(GRAPH *graph)
|
||||||
#ifdef HAVE_LIBXFT
|
#ifdef HAVE_LIBXFT
|
||||||
XftFontClose( display, DEVDEP(graph).font0);
|
XftFontClose( display, DEVDEP(graph).font0);
|
||||||
XftFontClose( display, DEVDEP(graph).font90);
|
XftFontClose( display, DEVDEP(graph).font90);
|
||||||
XftDrawDestroy(DEVDEP(graph).draw);
|
|
||||||
XftColorFree(display, DefaultVisual(display, 0), DEVDEP(graph).cmap, &DEVDEP(graph).color);
|
XftColorFree(display, DefaultVisual(display, 0), DEVDEP(graph).cmap, &DEVDEP(graph).color);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue