(frame-notice-user-settings): Only adjust frame height
authorJason Rumney <jasonr@gnu.org>
Fri, 23 Feb 2001 10:23:08 +0000 (10:23 +0000)
committerJason Rumney <jasonr@gnu.org>
Fri, 23 Feb 2001 10:23:08 +0000 (10:23 +0000)
for no tool-bar case if tool-bar was originally switched on.

lisp/ChangeLog
lisp/frame.el

index 59c088f5163195209e5900c07bc753d3f32c73cc..d6e4e75cfef82145e43edad40795ec61d269090c 100644 (file)
@@ -1,3 +1,11 @@
+2001-02-23  Jason Rumney  <jasonr@gnu.org>
+
+       * startup.el (tool-bar-originally-present): New variable.
+       (command-line): Set it if the tool-bar is switched on at startup.
+
+       * frame.el (frame-notice-user-settings): Only adjust frame height
+       for no tool-bar case if tool-bar was originally switched on.
+
 2001-02-22  Stefan Monnier  <monnier@cs.yale.edu>
 
        * server.el (server-switch-buffer): Only switch window if the
index 3def9a94ae3d008b82b2c70a2bb395e404890468..c05347c2d4bfabb43366a4cc662f60cbc1bf45c2 100644 (file)
@@ -292,11 +292,12 @@ React to settings of `default-frame-alist', `initial-frame-alist' there."
       (when (display-graphic-p)
        (let ((tool-bar-lines (or (assq 'tool-bar-lines initial-frame-alist)
                                  (assq 'tool-bar-lines default-frame-alist))))
-         (when (or (null tool-bar-lines)
-                   (null (cdr tool-bar-lines))
-                   (eq 0 (cdr tool-bar-lines)))
+         (when (and tool-bar-originally-present
+                     (or (null tool-bar-lines)
+                         (null (cdr tool-bar-lines))
+                         (eq 0 (cdr tool-bar-lines))))
            (let* ((char-height (frame-char-height frame-initial-frame))
-                  (image-height 24)
+                  (image-height tool-bar-images-pixel-height)
                   (margin (cond ((and (consp tool-bar-button-margin)
                                       (integerp (cdr tool-bar-button-margin))
                                       (> tool-bar-button-margin 0))