diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 36 |
2 files changed, 34 insertions, 4 deletions
diff --git a/src/window.c b/src/window.c index 0ac76d41861..753c4ab8123 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -4555,6 +4555,7 @@ grow_mini_window (struct window *w, int delta, bool pixelwise) | |||
| 4555 | /* Enforce full redisplay of the frame. */ | 4555 | /* Enforce full redisplay of the frame. */ |
| 4556 | /* FIXME: Shouldn't window--resize-root-window-vertically do it? */ | 4556 | /* FIXME: Shouldn't window--resize-root-window-vertically do it? */ |
| 4557 | fset_redisplay (f); | 4557 | fset_redisplay (f); |
| 4558 | FRAME_WINDOW_SIZES_CHANGED (f) = true; | ||
| 4558 | adjust_frame_glyphs (f); | 4559 | adjust_frame_glyphs (f); |
| 4559 | unblock_input (); | 4560 | unblock_input (); |
| 4560 | } | 4561 | } |
| @@ -4594,6 +4595,7 @@ shrink_mini_window (struct window *w, bool pixelwise) | |||
| 4594 | /* Enforce full redisplay of the frame. */ | 4595 | /* Enforce full redisplay of the frame. */ |
| 4595 | /* FIXME: Shouldn't window--resize-root-window-vertically do it? */ | 4596 | /* FIXME: Shouldn't window--resize-root-window-vertically do it? */ |
| 4596 | fset_redisplay (f); | 4597 | fset_redisplay (f); |
| 4598 | FRAME_WINDOW_SIZES_CHANGED (f) = true; | ||
| 4597 | adjust_frame_glyphs (f); | 4599 | adjust_frame_glyphs (f); |
| 4598 | unblock_input (); | 4600 | unblock_input (); |
| 4599 | } | 4601 | } |
diff --git a/src/xdisp.c b/src/xdisp.c index 30dfac55601..85d356e9ba5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -13536,6 +13536,32 @@ redisplay_internal (void) | |||
| 13536 | { | 13536 | { |
| 13537 | echo_area_display (false); | 13537 | echo_area_display (false); |
| 13538 | 13538 | ||
| 13539 | /* If echo_area_display resizes the mini-window, the redisplay and | ||
| 13540 | window_sizes_changed flags of the selected frame are set, but | ||
| 13541 | it's too late for the hooks in window-size-change-functions, | ||
| 13542 | which have been examined already in prepare_menu_bars. So in | ||
| 13543 | that case we call the hooks here only for the selected frame. */ | ||
| 13544 | if (sf->redisplay && FRAME_WINDOW_SIZES_CHANGED (sf)) | ||
| 13545 | { | ||
| 13546 | Lisp_Object functions; | ||
| 13547 | ptrdiff_t count1 = SPECPDL_INDEX (); | ||
| 13548 | |||
| 13549 | record_unwind_save_match_data (); | ||
| 13550 | |||
| 13551 | /* Clear flag first in case we get an error below. */ | ||
| 13552 | FRAME_WINDOW_SIZES_CHANGED (sf) = false; | ||
| 13553 | functions = Vwindow_size_change_functions; | ||
| 13554 | |||
| 13555 | while (CONSP (functions)) | ||
| 13556 | { | ||
| 13557 | if (!EQ (XCAR (functions), Qt)) | ||
| 13558 | call1 (XCAR (functions), selected_frame); | ||
| 13559 | functions = XCDR (functions); | ||
| 13560 | } | ||
| 13561 | |||
| 13562 | unbind_to (count1, Qnil); | ||
| 13563 | } | ||
| 13564 | |||
| 13539 | if (message_cleared_p) | 13565 | if (message_cleared_p) |
| 13540 | update_miniwindow_p = true; | 13566 | update_miniwindow_p = true; |
| 13541 | 13567 | ||
| @@ -31132,11 +31158,13 @@ the buffer when it becomes large. */); | |||
| 31132 | Vmessage_log_max = make_number (1000); | 31158 | Vmessage_log_max = make_number (1000); |
| 31133 | 31159 | ||
| 31134 | DEFVAR_LISP ("window-size-change-functions", Vwindow_size_change_functions, | 31160 | DEFVAR_LISP ("window-size-change-functions", Vwindow_size_change_functions, |
| 31135 | doc: /* Functions called before redisplay, if window sizes have changed. | 31161 | doc: /* Functions called during redisplay, if window sizes have changed. |
| 31136 | The value should be a list of functions that take one argument. | 31162 | The value should be a list of functions that take one argument. |
| 31137 | Just before redisplay, for each frame, if any of its windows have changed | 31163 | During the first part of redisplay, for each frame, if any of its windows |
| 31138 | size since the last redisplay, or have been split or deleted, | 31164 | have changed size since the last redisplay, or have been split or deleted, |
| 31139 | all the functions in the list are called, with the frame as argument. */); | 31165 | all the functions in the list are called, with the frame as argument. |
| 31166 | If redisplay decides to resize the minibuffer window, it calls these | ||
| 31167 | functions on behalf of that as well. */); | ||
| 31140 | Vwindow_size_change_functions = Qnil; | 31168 | Vwindow_size_change_functions = Qnil; |
| 31141 | 31169 | ||
| 31142 | DEFVAR_LISP ("window-scroll-functions", Vwindow_scroll_functions, | 31170 | DEFVAR_LISP ("window-scroll-functions", Vwindow_scroll_functions, |