commit: Update window-size computation.

Michael Sperber sperber-guest at alioth.debian.org
Wed Jan 2 04:13:45 EST 2008


changeset:   4375:74e0e1131e011672c4512111c51ef3795e4bf995
user:        Mike Sperber <sperber at deinprogramm.de>
date:        Wed Jan 02 10:12:04 2008 +0100
files:       src/ChangeLog src/window.c
description:
Update window-size computation.

2008-01-02  Mike Sperber  <mike at xemacs.org>

	* window.c (set_window_pixsize): Factor in the modeline when
	looking at window_min_width.  Remove obsolete comment about
	incorrect use of `default_face_height_and_width'.
	(change_window_height): Remove obsolete comment about
	incorrect use of `default_face_height_and_width'.


diff -r 4939bde48d124b27dc8fe1878a6d681f5a1fd24c -r 74e0e1131e011672c4512111c51ef3795e4bf995 src/ChangeLog
--- a/src/ChangeLog	Tue Jan 01 22:09:51 2008 -0800
+++ b/src/ChangeLog	Wed Jan 02 10:12:04 2008 +0100
@@ -1,3 +1,11 @@ 2007-12-30  Aidan Kehoe  <kehoea at parhasa
+2008-01-02  Mike Sperber  <mike at xemacs.org>
+
+	* window.c (set_window_pixsize): Factor in the modeline when
+	looking at window_min_width.  Remove obsolete comment about
+	incorrect use of `default_face_height_and_width'.
+	(change_window_height): Remove obsolete comment about
+	incorrect use of `default_face_height_and_width'.
+
 2007-12-30  Aidan Kehoe  <kehoea at parhasard.net>
 
 	* doc.c (Fbuilt_in_symbol_file):
diff -r 4939bde48d124b27dc8fe1878a6d681f5a1fd24c -r 74e0e1131e011672c4512111c51ef3795e4bf995 src/window.c
--- a/src/window.c	Tue Jan 01 22:09:51 2008 -0800
+++ b/src/window.c	Wed Jan 02 10:12:04 2008 +0100
@@ -3520,8 +3520,6 @@ set_window_pixsize (Lisp_Object window, 
   int line_size;
   int defheight, defwidth;
 
-  /* #### This is very likely incorrect and instead the char_to_pixel_
-     functions should be called. */
   default_face_height_and_width (window, &defheight, &defwidth);
   line_size = (set_height ? defheight : defwidth);
 
@@ -3532,7 +3530,7 @@ set_window_pixsize (Lisp_Object window, 
 
   if (!nodelete
       && !TOP_LEVEL_WINDOW_P (w)
-      && new_pixsize < minsize)
+      && (new_pixsize + window_modeline_height (w)) < minsize)
     {
       Fdelete_window (window, Qnil);
       return;
@@ -4369,8 +4367,6 @@ change_window_height (Lisp_Object window
   if (EQ (window, FRAME_ROOT_WINDOW (f)))
     invalid_operation ("Won't change only window", Qunbound);
 
-  /* #### This is very likely incorrect and instead the char_to_pixel_
-     functions should be called. */
   default_face_height_and_width (window, &defheight, &defwidth);
 
   while (1)




More information about the XEmacs-Patches mailing list