aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorPaul Eggert2012-04-09 15:54:59 -0700
committerPaul Eggert2012-04-09 15:54:59 -0700
commit45e9f7da84c1bd3fc0d36d05c5708ed3b2d3a193 (patch)
tree5bc87a8b5a3c754b8eb44a612cc6c03561d6b968 /src/window.c
parent9d6b4d53469a9ffd67bd770fabc6fe254e35c21d (diff)
parent05920a43fc18e696b464387e781e7cfdcea5b5af (diff)
downloademacs-45e9f7da84c1bd3fc0d36d05c5708ed3b2d3a193.tar.gz
emacs-45e9f7da84c1bd3fc0d36d05c5708ed3b2d3a193.zip
Merge from trunk.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/window.c b/src/window.c
index af70890d4e4..7fda1b3bc54 100644
--- a/src/window.c
+++ b/src/window.c
@@ -122,9 +122,6 @@ static int window_initialized;
122/* Hook to run when window config changes. */ 122/* Hook to run when window config changes. */
123static Lisp_Object Qwindow_configuration_change_hook; 123static Lisp_Object Qwindow_configuration_change_hook;
124 124
125/* If non-nil, run_window_configuration_change_hook does nothing. */
126Lisp_Object inhibit_window_configuration_change_hook;
127
128/* Used by the function window_scroll_pixel_based */ 125/* Used by the function window_scroll_pixel_based */
129static int window_scroll_pixel_based_preserve_x; 126static int window_scroll_pixel_based_preserve_x;
130static int window_scroll_pixel_based_preserve_y; 127static int window_scroll_pixel_based_preserve_y;
@@ -2569,6 +2566,7 @@ window-start value is reasonable when this function is called. */)
2569 Lisp_Object sibling, pwindow, swindow IF_LINT (= Qnil), delta; 2566 Lisp_Object sibling, pwindow, swindow IF_LINT (= Qnil), delta;
2570 ptrdiff_t startpos IF_LINT (= 0); 2567 ptrdiff_t startpos IF_LINT (= 0);
2571 int top IF_LINT (= 0), new_top, resize_failed; 2568 int top IF_LINT (= 0), new_top, resize_failed;
2569 Mouse_HLInfo *hlinfo;
2572 2570
2573 w = decode_any_window (window); 2571 w = decode_any_window (window);
2574 XSETWINDOW (window, w); 2572 XSETWINDOW (window, w);
@@ -2649,6 +2647,20 @@ window-start value is reasonable when this function is called. */)
2649 } 2647 }
2650 2648
2651 BLOCK_INPUT; 2649 BLOCK_INPUT;
2650 hlinfo = MOUSE_HL_INFO (f);
2651 /* We are going to free the glyph matrices of WINDOW, and with that
2652 we might lose any information about glyph rows that have some of
2653 their glyphs highlighted in mouse face. (These rows are marked
2654 with a non-zero mouse_face_p flag.) If WINDOW indeed has some
2655 glyphs highlighted in mouse face, signal to frame's up-to-date
2656 hook that mouse highlight was overwritten, so that it will
2657 arrange for redisplaying the highlight. */
2658 if (EQ (hlinfo->mouse_face_window, window))
2659 {
2660 hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
2661 hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1;
2662 hlinfo->mouse_face_window = Qnil;
2663 }
2652 free_window_matrices (r); 2664 free_window_matrices (r);
2653 2665
2654 windows_or_buffers_changed++; 2666 windows_or_buffers_changed++;
@@ -2898,7 +2910,7 @@ run_window_configuration_change_hook (struct frame *f)
2898 = Fdefault_value (Qwindow_configuration_change_hook); 2910 = Fdefault_value (Qwindow_configuration_change_hook);
2899 XSETFRAME (frame, f); 2911 XSETFRAME (frame, f);
2900 2912
2901 if (NILP (Vrun_hooks) || !NILP (inhibit_window_configuration_change_hook)) 2913 if (NILP (Vrun_hooks) || !NILP (inhibit_lisp_code))
2902 return; 2914 return;
2903 2915
2904 /* Use the right buffer. Matters when running the local hooks. */ 2916 /* Use the right buffer. Matters when running the local hooks. */
@@ -6529,8 +6541,6 @@ syms_of_window (void)
6529 window_scroll_preserve_hpos = -1; 6541 window_scroll_preserve_hpos = -1;
6530 window_scroll_preserve_vpos = -1; 6542 window_scroll_preserve_vpos = -1;
6531 6543
6532 inhibit_window_configuration_change_hook = Qnil;
6533
6534 DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function, 6544 DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
6535 doc: /* Non-nil means call as function to display a help buffer. 6545 doc: /* Non-nil means call as function to display a help buffer.
6536The function is called with one argument, the buffer to be displayed. 6546The function is called with one argument, the buffer to be displayed.