diff --git a/lisp/window.el b/lisp/window.el index f4226fa4428..e648ccb270a 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -1692,9 +1692,10 @@ window--min-size-1 0 (window-min-pixel-height window))) (max (ceiling pixel-height char-size) - (if (window--min-size-ignore-p window ignore) - 0 - window-min-height)))))))))) + (cond + ((window--min-size-ignore-p window ignore) 0) + ((window-minibuffer-p window) 1) + (t window-min-height))))))))))) (defun window-sizable (window delta &optional horizontal ignore pixelwise) "Return DELTA if DELTA lines can be added to WINDOW. @@ -1888,7 +1889,7 @@ frame-windows-min-size (mini (window-next-sibling root))) (+ (window-min-size root horizontal ignore pixelwise) (if (and mini (not horizontal)) - (window-min-size mini horizontal nil pixelwise) + (window-min-size mini horizontal ignore pixelwise) 0)))) (defun window--max-delta-1 (window delta &optional horizontal ignore trail noup pixelwise) diff --git a/src/dispnew.c b/src/dispnew.c index 1a243079e46..8a57866d3ed 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -6054,6 +6054,11 @@ change_frame_size_1 (struct frame *f, int new_width, int new_height, adjust_frame_size (f, FRAME_PIXEL_TO_TEXT_WIDTH (f, new_width), FRAME_PIXEL_TO_TEXT_HEIGHT (f, new_height), 5, pretend, Qchange_frame_size); + if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f)) + { + FrameRows (FRAME_TTY (f)) = new_height; + FrameCols (FRAME_TTY (f)) = new_width; + } } } diff --git a/src/frame.c b/src/frame.c index 7f4bf274ad9..9908ec307f7 100644 --- a/src/frame.c +++ b/src/frame.c @@ -827,14 +827,26 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height, new_text_lines = dos_new_text_lines - FRAME_TOP_MARGIN (f); #endif + /* Assign new sizes. Do it here to make sure that frame based + redisplay gets congruent sizes for the dimensions of the frame + matrix and the combined window matrices. */ + FRAME_COLS (f) = new_text_cols; + FRAME_LINES (f) = new_text_lines; + FRAME_TEXT_WIDTH (f) = new_text_width; + FRAME_TEXT_HEIGHT (f) = new_text_height; + FRAME_PIXEL_WIDTH (f) = new_native_width; + FRAME_PIXEL_HEIGHT (f) = new_native_height; + FRAME_TOTAL_COLS (f) = FRAME_PIXEL_WIDTH (f) / FRAME_COLUMN_WIDTH (f); + FRAME_TOTAL_LINES (f) = FRAME_PIXEL_HEIGHT (f) / FRAME_LINE_HEIGHT (f); + if (new_inner_width != old_inner_width) { resize_frame_windows (f, new_inner_width, true); /* MSDOS frames cannot PRETEND, as they change frame size by manipulating video hardware. */ - if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f)) - FrameCols (FRAME_TTY (f)) = new_text_cols; +/** if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f)) **/ +/** FrameCols (FRAME_TTY (f)) = new_text_cols; **/ #if defined (HAVE_WINDOW_SYSTEM) if (WINDOWP (f->tab_bar_window)) @@ -867,22 +879,12 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height, /* MSDOS frames cannot PRETEND, as they change frame size by manipulating video hardware. */ - if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f)) - FrameRows (FRAME_TTY (f)) = new_text_lines + FRAME_TOP_MARGIN (f); +/** if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f)) **/ +/** FrameRows (FRAME_TTY (f)) = new_text_lines + FRAME_TOP_MARGIN (f); **/ } else if (new_text_lines != old_text_lines) call2 (Qwindow__pixel_to_total, frame, Qnil); - /* Assign new sizes. */ - FRAME_COLS (f) = new_text_cols; - FRAME_LINES (f) = new_text_lines; - FRAME_TEXT_WIDTH (f) = new_text_width; - FRAME_TEXT_HEIGHT (f) = new_text_height; - FRAME_PIXEL_WIDTH (f) = new_native_width; - FRAME_PIXEL_HEIGHT (f) = new_native_height; - FRAME_TOTAL_COLS (f) = FRAME_PIXEL_WIDTH (f) / FRAME_COLUMN_WIDTH (f); - FRAME_TOTAL_LINES (f) = FRAME_PIXEL_HEIGHT (f) / FRAME_LINE_HEIGHT (f); - { struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f)); int text_area_x, text_area_y, text_area_width, text_area_height;