diff options
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/src/window.c b/src/window.c index ae8d209df74..f05bba8aedf 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -2565,7 +2565,6 @@ window-start value is reasonable when this function is called. */) | |||
| 2565 | Lisp_Object sibling, pwindow, swindow IF_LINT (= Qnil), delta; | 2565 | Lisp_Object sibling, pwindow, swindow IF_LINT (= Qnil), delta; |
| 2566 | EMACS_INT startpos IF_LINT (= 0); | 2566 | EMACS_INT startpos IF_LINT (= 0); |
| 2567 | int top IF_LINT (= 0), new_top, resize_failed; | 2567 | int top IF_LINT (= 0), new_top, resize_failed; |
| 2568 | Mouse_HLInfo *hlinfo; | ||
| 2569 | 2568 | ||
| 2570 | w = decode_any_window (window); | 2569 | w = decode_any_window (window); |
| 2571 | CHECK_LIVE_FRAME (w->frame); | 2570 | CHECK_LIVE_FRAME (w->frame); |
| @@ -2648,19 +2647,23 @@ window-start value is reasonable when this function is called. */) | |||
| 2648 | } | 2647 | } |
| 2649 | 2648 | ||
| 2650 | BLOCK_INPUT; | 2649 | BLOCK_INPUT; |
| 2651 | hlinfo = MOUSE_HL_INFO (f); | 2650 | if (!FRAME_INITIAL_P (f)) |
| 2652 | /* We are going to free the glyph matrices of WINDOW, and with that | ||
| 2653 | we might lose any information about glyph rows that have some of | ||
| 2654 | their glyphs highlighted in mouse face. (These rows are marked | ||
| 2655 | with a non-zero mouse_face_p flag.) If WINDOW indeed has some | ||
| 2656 | glyphs highlighted in mouse face, signal to frame's up-to-date | ||
| 2657 | hook that mouse highlight was overwritten, so that it will | ||
| 2658 | arrange for redisplaying the highlight. */ | ||
| 2659 | if (EQ (hlinfo->mouse_face_window, window)) | ||
| 2660 | { | 2651 | { |
| 2661 | hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; | 2652 | Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); |
| 2662 | hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; | 2653 | |
| 2663 | hlinfo->mouse_face_window = Qnil; | 2654 | /* We are going to free the glyph matrices of WINDOW, and with |
| 2655 | that we might lose any information about glyph rows that have | ||
| 2656 | some of their glyphs highlighted in mouse face. (These rows | ||
| 2657 | are marked with a non-zero mouse_face_p flag.) If WINDOW | ||
| 2658 | indeed has some glyphs highlighted in mouse face, signal to | ||
| 2659 | frame's up-to-date hook that mouse highlight was overwritten, | ||
| 2660 | so that it will arrange for redisplaying the highlight. */ | ||
| 2661 | if (EQ (hlinfo->mouse_face_window, window)) | ||
| 2662 | { | ||
| 2663 | hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; | ||
| 2664 | hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; | ||
| 2665 | hlinfo->mouse_face_window = Qnil; | ||
| 2666 | } | ||
| 2664 | } | 2667 | } |
| 2665 | free_window_matrices (r); | 2668 | free_window_matrices (r); |
| 2666 | 2669 | ||
| @@ -3903,7 +3906,6 @@ Signal an error when WINDOW is the only window on its frame. */) | |||
| 3903 | && EQ (r->new_total, (horflag ? r->total_cols : r->total_lines))) | 3906 | && EQ (r->new_total, (horflag ? r->total_cols : r->total_lines))) |
| 3904 | /* We can delete WINDOW now. */ | 3907 | /* We can delete WINDOW now. */ |
| 3905 | { | 3908 | { |
| 3906 | Mouse_HLInfo *hlinfo; | ||
| 3907 | 3909 | ||
| 3908 | /* Block input. */ | 3910 | /* Block input. */ |
| 3909 | BLOCK_INPUT; | 3911 | BLOCK_INPUT; |
| @@ -3911,9 +3913,13 @@ Signal an error when WINDOW is the only window on its frame. */) | |||
| 3911 | 3913 | ||
| 3912 | /* If this window is referred to by the dpyinfo's mouse | 3914 | /* If this window is referred to by the dpyinfo's mouse |
| 3913 | highlight, invalidate that slot to be safe (Bug#9904). */ | 3915 | highlight, invalidate that slot to be safe (Bug#9904). */ |
| 3914 | hlinfo = MOUSE_HL_INFO (XFRAME (w->frame)); | 3916 | if (!FRAME_INITIAL_P (f)) |
| 3915 | if (EQ (hlinfo->mouse_face_window, window)) | 3917 | { |
| 3916 | hlinfo->mouse_face_window = Qnil; | 3918 | Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); |
| 3919 | |||
| 3920 | if (EQ (hlinfo->mouse_face_window, window)) | ||
| 3921 | hlinfo->mouse_face_window = Qnil; | ||
| 3922 | } | ||
| 3917 | 3923 | ||
| 3918 | windows_or_buffers_changed++; | 3924 | windows_or_buffers_changed++; |
| 3919 | Vwindow_list = Qnil; | 3925 | Vwindow_list = Qnil; |