From 25badd7aeb4c086b39ffec6783d4ee1cef1c15ae Mon Sep 17 00:00:00 2001 From: Andrew Innes Date: Thu, 14 Dec 2000 10:55:10 +0000 Subject: [PATCH] (clear_mouse_face): Treat tip_frame as a Lisp_Object. (x_free_frame_resources): New function. (x_destroy_window): Use it. --- src/w32term.c | 42 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/src/w32term.c b/src/w32term.c index 6116f9ac8d8..e3ee34c9444 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -7033,7 +7033,7 @@ void clear_mouse_face (dpyinfo) struct w32_display_info *dpyinfo; { - if (tip_frame) + if (!NILP (tip_frame)) return; if (! NILP (dpyinfo->mouse_face_window)) @@ -9873,21 +9873,34 @@ x_iconify_frame (f) UNBLOCK_INPUT; } -/* Destroy the window of frame F. */ +/* Free X resources of frame F. */ -x_destroy_window (f) +void +x_free_frame_resources (f) struct frame *f; { struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); BLOCK_INPUT; - my_destroy_window (f, FRAME_W32_WINDOW (f)); + if (FRAME_W32_WINDOW (f)) + my_destroy_window (f, FRAME_W32_WINDOW (f)); + free_frame_menubar (f); - free_frame_faces (f); + unload_color (f, f->output_data.x->foreground_pixel); + unload_color (f, f->output_data.x->background_pixel); + unload_color (f, f->output_data.w32->cursor_pixel); + unload_color (f, f->output_data.w32->cursor_foreground_pixel); + unload_color (f, f->output_data.w32->border_pixel); + unload_color (f, f->output_data.w32->mouse_pixel); + + if (FRAME_FACE_CACHE (f)) + free_frame_faces (f); + xfree (f->output_data.w32); - f->output_data.w32 = 0; + f->output_data.w32 = NULL; + if (f == dpyinfo->w32_focus_frame) dpyinfo->w32_focus_frame = 0; if (f == dpyinfo->w32_focus_event_frame) @@ -9895,8 +9908,6 @@ x_destroy_window (f) if (f == dpyinfo->w32_highlight_frame) dpyinfo->w32_highlight_frame = 0; - dpyinfo->reference_count--; - if (f == dpyinfo->mouse_face_mouse_frame) { dpyinfo->mouse_face_beg_row @@ -9904,10 +9915,25 @@ x_destroy_window (f) dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1; dpyinfo->mouse_face_window = Qnil; + dpyinfo->mouse_face_deferred_gc = 0; + dpyinfo->mouse_face_mouse_frame = 0; } UNBLOCK_INPUT; } + + +/* Destroy the window of frame F. */ + +x_destroy_window (f) + struct frame *f; +{ + struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); + + x_free_frame_resources (f); + + dpyinfo->reference_count--; +} /* Setting window manager hints. */ -- 2.39.2