(x_free_frame_resources) [USE_X_TOOLKIT]: Remove all the
scroll bars of the frame before deleting the frame itself. If the frame has a widget, delete the frame with XtDestroyWidget, and do not call XDestroyWindow before that.
This commit is contained in:
parent
5385455256
commit
c6ea27758c
2 changed files with 33 additions and 7 deletions
|
@ -1,3 +1,10 @@
|
|||
2001-12-06 Eli Zaretskii <eliz@is.elta.co.il>
|
||||
|
||||
* xterm.c (x_free_frame_resources) [USE_X_TOOLKIT]: Remove all the
|
||||
scroll bars of the frame before deleting the frame itself. If the
|
||||
frame has a widget, delete the frame with XtDestroyWidget, and do
|
||||
not call XDestroyWindow before that.
|
||||
|
||||
2001-12-06 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* xfns.c (x_report_frame_params): Return actual fringe widths.
|
||||
|
|
33
src/xterm.c
33
src/xterm.c
|
@ -13219,6 +13219,8 @@ x_free_frame_resources (f)
|
|||
struct frame *f;
|
||||
{
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
Lisp_Object bar;
|
||||
struct scroll_bar *b;
|
||||
|
||||
BLOCK_INPUT;
|
||||
|
||||
|
@ -13228,23 +13230,40 @@ x_free_frame_resources (f)
|
|||
{
|
||||
if (f->output_data.x->icon_desc)
|
||||
XDestroyWindow (FRAME_X_DISPLAY (f), f->output_data.x->icon_desc);
|
||||
|
||||
|
||||
#ifdef USE_X_TOOLKIT
|
||||
/* Explicitly destroy the scroll bars of the frame. Without
|
||||
this, we get "BadDrawable" errors from the toolkit later on,
|
||||
presumably from expose events generated for the disappearing
|
||||
toolkit scroll bars. */
|
||||
for (bar = FRAME_SCROLL_BARS (f); !NILP (bar); bar = b->next)
|
||||
{
|
||||
b = XSCROLL_BAR (bar);
|
||||
x_scroll_bar_remove (b);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_X_I18N
|
||||
if (FRAME_XIC (f))
|
||||
free_frame_xic (f);
|
||||
#endif
|
||||
|
||||
if (FRAME_X_WINDOW (f))
|
||||
XDestroyWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
|
||||
|
||||
|
||||
#ifdef USE_X_TOOLKIT
|
||||
if (f->output_data.x->widget)
|
||||
{
|
||||
XtDestroyWidget (f->output_data.x->widget);
|
||||
f->output_data.x->widget = NULL;
|
||||
}
|
||||
/* Tooltips don't have widgets, only a simple X window, even if
|
||||
we are using a toolkit. */
|
||||
else if (FRAME_X_WINDOW (f))
|
||||
XDestroyWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
|
||||
|
||||
free_frame_menubar (f);
|
||||
#endif /* USE_X_TOOLKIT */
|
||||
#else /* !USE_X_TOOLKIT */
|
||||
if (FRAME_X_WINDOW (f))
|
||||
XDestroyWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
|
||||
#endif /* !USE_X_TOOLKIT */
|
||||
|
||||
unload_color (f, f->output_data.x->foreground_pixel);
|
||||
unload_color (f, f->output_data.x->background_pixel);
|
||||
|
@ -13252,7 +13271,7 @@ x_free_frame_resources (f)
|
|||
unload_color (f, f->output_data.x->cursor_foreground_pixel);
|
||||
unload_color (f, f->output_data.x->border_pixel);
|
||||
unload_color (f, f->output_data.x->mouse_pixel);
|
||||
|
||||
|
||||
if (f->output_data.x->scroll_bar_background_pixel != -1)
|
||||
unload_color (f, f->output_data.x->scroll_bar_background_pixel);
|
||||
if (f->output_data.x->scroll_bar_foreground_pixel != -1)
|
||||
|
|
Loading…
Add table
Reference in a new issue