]> git.eshelyaron.com Git - emacs.git/commitdiff
Put height and width from geometry parm into default-frame-alist.
authorRichard M. Stallman <rms@gnu.org>
Wed, 11 Jan 1995 04:44:10 +0000 (04:44 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 11 Jan 1995 04:44:10 +0000 (04:44 +0000)
lisp/term/x-win.el

index 94abf5f6b8280a5f717ab4cabef577342506644c..e09a04fc22343c6f596ca3b5c96de5a67ad8022c 100644 (file)
@@ -693,10 +693,22 @@ This is in addition to the primary selection.")
 ;; Apply a geometry resource to the initial frame.  Put it at the end
 ;; of the alist, so that anything specified on the command line takes
 ;; precedence.
-(let ((res-geometry (x-get-resource "geometry" "Geometry")))
+(let* ((res-geometry (x-get-resource "geometry" "Geometry"))
+       parsed)
   (if res-geometry
-      (setq initial-frame-alist (append initial-frame-alist
-                                       (x-parse-geometry res-geometry)))))
+      (progn
+       (setq parsed (x-parse-geometry res-geometry))
+       ;; All geometry parms apply to the initial frame.
+       (setq initial-frame-alist (append initial-frame-alist parsed))
+       ;; The size parms apply to all frames.
+       (if (assq 'height parsed)
+           (setq default-frame-alist
+                 (cons (cons 'height (cdr (assq 'height parsed)))
+                       default-frame-alist)))
+       (if (assq 'width parsed)
+           (setq default-frame-alist
+                 (cons (cons 'width (cdr (assq 'width parsed)))
+                       default-frame-alist))))))
 
 ;; Check the reverseVideo resource.
 (let ((case-fold-search t))