aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorPaul Eggert2012-02-24 22:41:40 -0800
committerPaul Eggert2012-02-24 22:41:40 -0800
commita89654f8f34114db543cb91363e8fded6d73e986 (patch)
tree5ac508597ef2aa460308b4b26c244779e48cdb40 /src/window.c
parent6e6c82a4e687708d5a7a3887f92db45bd74da276 (diff)
parent67b0de11479247cb8bd8491e10e0b464046f18be (diff)
downloademacs-a89654f8f34114db543cb91363e8fded6d73e986.tar.gz
emacs-a89654f8f34114db543cb91363e8fded6d73e986.zip
Merge from trunk.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c
index a0b11e0e320..af70890d4e4 100644
--- a/src/window.c
+++ b/src/window.c
@@ -122,6 +122,9 @@ 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
125/* Used by the function window_scroll_pixel_based */ 128/* Used by the function window_scroll_pixel_based */
126static int window_scroll_pixel_based_preserve_x; 129static int window_scroll_pixel_based_preserve_x;
127static int window_scroll_pixel_based_preserve_y; 130static int window_scroll_pixel_based_preserve_y;
@@ -2895,7 +2898,7 @@ run_window_configuration_change_hook (struct frame *f)
2895 = Fdefault_value (Qwindow_configuration_change_hook); 2898 = Fdefault_value (Qwindow_configuration_change_hook);
2896 XSETFRAME (frame, f); 2899 XSETFRAME (frame, f);
2897 2900
2898 if (NILP (Vrun_hooks)) 2901 if (NILP (Vrun_hooks) || !NILP (inhibit_window_configuration_change_hook))
2899 return; 2902 return;
2900 2903
2901 /* Use the right buffer. Matters when running the local hooks. */ 2904 /* Use the right buffer. Matters when running the local hooks. */
@@ -3887,10 +3890,18 @@ Signal an error when WINDOW is the only window on its frame. */)
3887 && EQ (r->new_total, (horflag ? r->total_cols : r->total_lines))) 3890 && EQ (r->new_total, (horflag ? r->total_cols : r->total_lines)))
3888 /* We can delete WINDOW now. */ 3891 /* We can delete WINDOW now. */
3889 { 3892 {
3893 Mouse_HLInfo *hlinfo;
3894
3890 /* Block input. */ 3895 /* Block input. */
3891 BLOCK_INPUT; 3896 BLOCK_INPUT;
3892 window_resize_apply (p, horflag); 3897 window_resize_apply (p, horflag);
3893 3898
3899 /* If this window is referred to by the dpyinfo's mouse
3900 highlight, invalidate that slot to be safe (Bug#9904). */
3901 hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
3902 if (EQ (hlinfo->mouse_face_window, window))
3903 hlinfo->mouse_face_window = Qnil;
3904
3894 windows_or_buffers_changed++; 3905 windows_or_buffers_changed++;
3895 Vwindow_list = Qnil; 3906 Vwindow_list = Qnil;
3896 FRAME_WINDOW_SIZES_CHANGED (f) = 1; 3907 FRAME_WINDOW_SIZES_CHANGED (f) = 1;
@@ -6518,6 +6529,8 @@ syms_of_window (void)
6518 window_scroll_preserve_hpos = -1; 6529 window_scroll_preserve_hpos = -1;
6519 window_scroll_preserve_vpos = -1; 6530 window_scroll_preserve_vpos = -1;
6520 6531
6532 inhibit_window_configuration_change_hook = Qnil;
6533
6521 DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function, 6534 DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
6522 doc: /* Non-nil means call as function to display a help buffer. 6535 doc: /* Non-nil means call as function to display a help buffer.
6523The function is called with one argument, the buffer to be displayed. 6536The function is called with one argument, the buffer to be displayed.