From xemacs-m  Thu May 29 02:04:14 1997
Received: from crystal.WonderWorks.COM (crystal.WonderWorks.com [192.203.206.1])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id CAA27779
	for <xemacs-beta@xemacs.org>; Thu, 29 May 1997 02:04:13 -0500 (CDT)
Received: by crystal.WonderWorks.COM 
	id QQcrpc10780; Thu, 29 May 1997 03:04:13 -0400 (EDT)
Date: Thu, 29 May 1997 03:04:13 -0400 (EDT)
Message-Id: <QQcrpc10780.199705290704@crystal.WonderWorks.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Kyle Jones <kyle_jones@wonderworks.com>
To: xemacs-beta@xemacs.org
Subject: [PATCH] 20.3-b2: fix for toolbar display problems related to 
                          frame size changes
X-Mailer: VM 6.32 under 20.3 XEmacs Lucid (beta2)
X-Face: /cA45WHG7jWq>(O3&Z57Y<"WsX5ddc,4c#w0F*zrV#=M
        0@~@,s;b,aMtR5Sqs"+nU.z^CSFQ9t`z2>W,S,]:[+2^
        Nbf6v4g>!&,7R4Ot4Wg{&tm=WX7P["9%a)_da48-^tGy
        ,qz]Z,Zz\{E.,]'EO+F)@$KtF&V

(No fair moving the beta3 date forward after I promised a patch.

"Your agonizer, Mr Baur.")

:-P :-)

Thu May 29 03:00:16 1997  Kyle Jones  <kyle@crystal.wonderworks.com>

	* src/frame.c (change_frame_size_1):
          Drop code that returns immediately if the old frame
          size is equal to the new.
	  Leave the minibuffer height the same if the frame has
	  been initialized, and the minibuffer height is tall
	  enough to display at least one line of text in the default
	  font, and the old minibuffer height is a multiple of the
	  default font height.  This should cause the minibuffer
	  height to be recomputed on font changes but not for
	  other frame size changes, which seems reasonable.
	  

--- 1.1	1997/05/28 02:08:57
+++ src/frame.c	1997/05/29 06:58:41
@@ -2637,14 +2637,6 @@
 
   XSETFRAME (frame, f);
 
-  /*
-   * If the frame has been initialized and the new height and width
-   * are the same as the current height and width, then just return.
-   */
-  if (f->init_finished &&
-      newheight == FRAME_HEIGHT (f) && newwidth == FRAME_WIDTH (f))
-    return;
-
   default_face_height_and_width (frame, &font_height, &font_width);
 
   /* This size-change overrides any pending one for this frame.  */
@@ -2702,14 +2694,29 @@
 	  && ! FRAME_MINIBUF_ONLY_P (f))
 	/* Frame has both root and minibuffer.  */
 	{
+	  /*
+	   * Leave the minibuffer height the same if the frame has
+	   * been initialized, and the minibuffer height is tall
+	   * enough to display at least one line of text in the default
+	   * font, and the old minibuffer height is a multiple of the
+	   * default font height.  This should cause the minibuffer
+	   * height to be recomputed on font changes but not for
+	   * other frame size changes, which seems reasonable.
+	   */
+	  int old_minibuf_height =
+	    XWINDOW(FRAME_MINIBUF_WINDOW(f))->pixel_height;
+	  int minibuf_height =
+	    f->init_finished && (old_minibuf_height % font_height) == 0 ?
+	    max(old_minibuf_height, font_height) :
+	    font_height;
 	  set_window_pixheight (FRAME_ROOT_WINDOW (f),
 				/* - font_height for minibuffer */
-				new_pixheight - font_height, 0);
+				new_pixheight - minibuf_height, 0);
 
 	  XWINDOW (FRAME_MINIBUF_WINDOW (f))->pixel_top =
-	    new_pixheight - font_height + FRAME_TOP_BORDER_END (f);
+	    new_pixheight - minibuf_height + FRAME_TOP_BORDER_END (f);
 	  
-	  set_window_pixheight (FRAME_MINIBUF_WINDOW (f), font_height, 0);
+	  set_window_pixheight (FRAME_MINIBUF_WINDOW (f), minibuf_height, 0);
 	}
       else
 	/* Frame has just one top-level window.  */

