diff options
author | Richard M. Stallman <[email protected]> | 1994-09-20 02:20:05 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 1994-09-20 02:20:05 +0000 |
commit | 756b6edc1eb0fcb6e03a46b690d4e86f9f17a984 (patch) | |
tree | e5431faaf4cd98da438ad096bc4c59681718f93b | |
parent | bbc3f190b8e9816c3c8b7aea105ae4342d0d15f7 (diff) |
(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.
-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 cf5aa8db7c..ba78cb5dd9 100644 --- a/src/window.c +++ b/src/window.c @@ -2697,6 +2697,9 @@ struct save_window_data Lisp_Object minibuf_scroll_window; Lisp_Object root_window; Lisp_Object focus_frame; + /* Record the values of window-min-width and window-min-height + so that window sizes remain consistent with them. */ + Lisp_Object min_width, min_height; /* A vector, interpreted as a struct saved_window */ Lisp_Object saved_windows; }; @@ -2796,6 +2799,11 @@ by `current-window-configuration' (which see).") windows_or_buffers_changed++; + /* Temporarily avoid any problems with windows that are smaller + than they are supposed to be. */ + window_min_height = 1; + window_min_width = 1; + /* Kludge Alert! Mark all windows now on frame as "deleted". Restoring the new configuration "undeletes" any that are in it. @@ -2936,6 +2944,10 @@ by `current-window-configuration' (which see).") #endif } + /* Restore the minimum heights recorded in the configuration. */ + window_min_height = XINT (data->min_height); + window_min_width = XINT (data->min_width); + #ifdef MULTI_FRAME /* Fselect_window will have made f the selected frame, so we reselect the proper frame here. Fhandle_switch_frame will change the @@ -3105,6 +3117,8 @@ redirection (see `redirect-frame-focus').") data->minibuf_scroll_window = Vminibuf_scroll_window; data->root_window = FRAME_ROOT_WINDOW (f); data->focus_frame = FRAME_FOCUS_FRAME (f); + XSET (data->min_height, Lisp_Int, window_min_height); + XSET (data->min_width, Lisp_Int, window_min_width); tem = Fmake_vector (make_number (n_windows), Qnil); data->saved_windows = tem; for (i = 0; i < n_windows; i++) |