aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32term.c
diff options
context:
space:
mode:
authorAndrew Innes2000-12-14 10:55:10 +0000
committerAndrew Innes2000-12-14 10:55:10 +0000
commit25badd7aeb4c086b39ffec6783d4ee1cef1c15ae (patch)
tree66b8bfc68d1e2c113e4e844c9dd8ce4493e2eb23 /src/w32term.c
parenta4ef85ee19fd2716607c8eb4ba3b8926a6343217 (diff)
downloademacs-25badd7aeb4c086b39ffec6783d4ee1cef1c15ae.tar.gz
emacs-25badd7aeb4c086b39ffec6783d4ee1cef1c15ae.zip
(clear_mouse_face): Treat tip_frame as a Lisp_Object.
(x_free_frame_resources): New function. (x_destroy_window): Use it.
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c42
1 files 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
7033clear_mouse_face (dpyinfo) 7033clear_mouse_face (dpyinfo)
7034 struct w32_display_info *dpyinfo; 7034 struct w32_display_info *dpyinfo;
7035{ 7035{
7036 if (tip_frame) 7036 if (!NILP (tip_frame))
7037 return; 7037 return;
7038 7038
7039 if (! NILP (dpyinfo->mouse_face_window)) 7039 if (! NILP (dpyinfo->mouse_face_window))
@@ -9873,21 +9873,34 @@ x_iconify_frame (f)
9873 UNBLOCK_INPUT; 9873 UNBLOCK_INPUT;
9874} 9874}
9875 9875
9876/* Destroy the window of frame F. */ 9876/* Free X resources of frame F. */
9877 9877
9878x_destroy_window (f) 9878void
9879x_free_frame_resources (f)
9879 struct frame *f; 9880 struct frame *f;
9880{ 9881{
9881 struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); 9882 struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
9882 9883
9883 BLOCK_INPUT; 9884 BLOCK_INPUT;
9884 9885
9885 my_destroy_window (f, FRAME_W32_WINDOW (f)); 9886 if (FRAME_W32_WINDOW (f))
9887 my_destroy_window (f, FRAME_W32_WINDOW (f));
9888
9886 free_frame_menubar (f); 9889 free_frame_menubar (f);
9887 free_frame_faces (f);
9888 9890
9891 unload_color (f, f->output_data.x->foreground_pixel);
9892 unload_color (f, f->output_data.x->background_pixel);
9893 unload_color (f, f->output_data.w32->cursor_pixel);
9894 unload_color (f, f->output_data.w32->cursor_foreground_pixel);
9895 unload_color (f, f->output_data.w32->border_pixel);
9896 unload_color (f, f->output_data.w32->mouse_pixel);
9897
9898 if (FRAME_FACE_CACHE (f))
9899 free_frame_faces (f);
9900
9889 xfree (f->output_data.w32); 9901 xfree (f->output_data.w32);
9890 f->output_data.w32 = 0; 9902 f->output_data.w32 = NULL;
9903
9891 if (f == dpyinfo->w32_focus_frame) 9904 if (f == dpyinfo->w32_focus_frame)
9892 dpyinfo->w32_focus_frame = 0; 9905 dpyinfo->w32_focus_frame = 0;
9893 if (f == dpyinfo->w32_focus_event_frame) 9906 if (f == dpyinfo->w32_focus_event_frame)
@@ -9895,8 +9908,6 @@ x_destroy_window (f)
9895 if (f == dpyinfo->w32_highlight_frame) 9908 if (f == dpyinfo->w32_highlight_frame)
9896 dpyinfo->w32_highlight_frame = 0; 9909 dpyinfo->w32_highlight_frame = 0;
9897 9910
9898 dpyinfo->reference_count--;
9899
9900 if (f == dpyinfo->mouse_face_mouse_frame) 9911 if (f == dpyinfo->mouse_face_mouse_frame)
9901 { 9912 {
9902 dpyinfo->mouse_face_beg_row 9913 dpyinfo->mouse_face_beg_row
@@ -9904,10 +9915,25 @@ x_destroy_window (f)
9904 dpyinfo->mouse_face_end_row 9915 dpyinfo->mouse_face_end_row
9905 = dpyinfo->mouse_face_end_col = -1; 9916 = dpyinfo->mouse_face_end_col = -1;
9906 dpyinfo->mouse_face_window = Qnil; 9917 dpyinfo->mouse_face_window = Qnil;
9918 dpyinfo->mouse_face_deferred_gc = 0;
9919 dpyinfo->mouse_face_mouse_frame = 0;
9907 } 9920 }
9908 9921
9909 UNBLOCK_INPUT; 9922 UNBLOCK_INPUT;
9910} 9923}
9924
9925
9926/* Destroy the window of frame F. */
9927
9928x_destroy_window (f)
9929 struct frame *f;
9930{
9931 struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
9932
9933 x_free_frame_resources (f);
9934
9935 dpyinfo->reference_count--;
9936}
9911 9937
9912/* Setting window manager hints. */ 9938/* Setting window manager hints. */
9913 9939