diff options
| author | Richard M. Stallman | 1994-09-20 02:20:05 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-09-20 02:20:05 +0000 |
| commit | 756b6edc1eb0fcb6e03a46b690d4e86f9f17a984 (patch) | |
| tree | e5431faaf4cd98da438ad096bc4c59681718f93b /src/window.c | |
| parent | bbc3f190b8e9816c3c8b7aea105ae4342d0d15f7 (diff) | |
| download | emacs-756b6edc1eb0fcb6e03a46b690d4e86f9f17a984.tar.gz emacs-756b6edc1eb0fcb6e03a46b690d4e86f9f17a984.zip | |
(struct saved_window_data): New slots min_width, min_height.
(Fcurrent_window_configuration): Set slots from window_min_...
(Fset_window_configuration): Restore them.
Set window_min_height and window_min_width to 1 while restoring windows.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c index cf5aa8db7cd..ba78cb5dd9b 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -2697,6 +2697,9 @@ struct save_window_data | |||
| 2697 | Lisp_Object minibuf_scroll_window; | 2697 | Lisp_Object minibuf_scroll_window; |
| 2698 | Lisp_Object root_window; | 2698 | Lisp_Object root_window; |
| 2699 | Lisp_Object focus_frame; | 2699 | Lisp_Object focus_frame; |
| 2700 | /* Record the values of window-min-width and window-min-height | ||
| 2701 | so that window sizes remain consistent with them. */ | ||
| 2702 | Lisp_Object min_width, min_height; | ||
| 2700 | /* A vector, interpreted as a struct saved_window */ | 2703 | /* A vector, interpreted as a struct saved_window */ |
| 2701 | Lisp_Object saved_windows; | 2704 | Lisp_Object saved_windows; |
| 2702 | }; | 2705 | }; |
| @@ -2796,6 +2799,11 @@ by `current-window-configuration' (which see).") | |||
| 2796 | 2799 | ||
| 2797 | windows_or_buffers_changed++; | 2800 | windows_or_buffers_changed++; |
| 2798 | 2801 | ||
| 2802 | /* Temporarily avoid any problems with windows that are smaller | ||
| 2803 | than they are supposed to be. */ | ||
| 2804 | window_min_height = 1; | ||
| 2805 | window_min_width = 1; | ||
| 2806 | |||
| 2799 | /* Kludge Alert! | 2807 | /* Kludge Alert! |
| 2800 | Mark all windows now on frame as "deleted". | 2808 | Mark all windows now on frame as "deleted". |
| 2801 | Restoring the new configuration "undeletes" any that are in it. | 2809 | Restoring the new configuration "undeletes" any that are in it. |
| @@ -2936,6 +2944,10 @@ by `current-window-configuration' (which see).") | |||
| 2936 | #endif | 2944 | #endif |
| 2937 | } | 2945 | } |
| 2938 | 2946 | ||
| 2947 | /* Restore the minimum heights recorded in the configuration. */ | ||
| 2948 | window_min_height = XINT (data->min_height); | ||
| 2949 | window_min_width = XINT (data->min_width); | ||
| 2950 | |||
| 2939 | #ifdef MULTI_FRAME | 2951 | #ifdef MULTI_FRAME |
| 2940 | /* Fselect_window will have made f the selected frame, so we | 2952 | /* Fselect_window will have made f the selected frame, so we |
| 2941 | reselect the proper frame here. Fhandle_switch_frame will change the | 2953 | reselect the proper frame here. Fhandle_switch_frame will change the |
| @@ -3105,6 +3117,8 @@ redirection (see `redirect-frame-focus').") | |||
| 3105 | data->minibuf_scroll_window = Vminibuf_scroll_window; | 3117 | data->minibuf_scroll_window = Vminibuf_scroll_window; |
| 3106 | data->root_window = FRAME_ROOT_WINDOW (f); | 3118 | data->root_window = FRAME_ROOT_WINDOW (f); |
| 3107 | data->focus_frame = FRAME_FOCUS_FRAME (f); | 3119 | data->focus_frame = FRAME_FOCUS_FRAME (f); |
| 3120 | XSET (data->min_height, Lisp_Int, window_min_height); | ||
| 3121 | XSET (data->min_width, Lisp_Int, window_min_width); | ||
| 3108 | tem = Fmake_vector (make_number (n_windows), Qnil); | 3122 | tem = Fmake_vector (make_number (n_windows), Qnil); |
| 3109 | data->saved_windows = tem; | 3123 | data->saved_windows = tem; |
| 3110 | for (i = 0; i < n_windows; i++) | 3124 | for (i = 0; i < n_windows; i++) |