changeset 42286:ce0c926022b3

(x-handle-geometry): Put height and width on default-frame-alist, left and top on initial-frame-alist.
author Richard M. Stallman <rms@gnu.org>
date Mon, 24 Dec 2001 04:52:30 +0000
parents c0c061d76ff5
children c95e74201401
files lisp/term/w32-win.el lisp/term/x-win.el
diffstat 2 files changed, 36 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/term/w32-win.el	Sun Dec 23 06:46:19 2001 +0000
+++ b/lisp/term/w32-win.el	Mon Dec 24 04:52:30 2001 +0000
@@ -300,15 +300,24 @@
 
 (defun x-handle-geometry (switch)
   "Handle the \"-geometry\" SWITCH."
-  (let ((geo (x-parse-geometry (car x-invocation-args))))
-    (setq initial-frame-alist
-	  (append initial-frame-alist
-		  (if (or (assq 'left geo) (assq 'top geo))
-		      '((user-position . t)))
-		  (if (or (assq 'height geo) (assq 'width geo))
-		      '((user-size . t)))
-		  geo)
-	  x-invocation-args (cdr x-invocation-args))))
+  (let* ((geo (x-parse-geometry (car x-invocation-args)))
+	 (left (assq 'left geo))
+	 (top (assq 'top geo))
+	 (height (assq 'height geo))
+	 (width (assq 'width geo)))
+    (if (or height width)
+	(setq default-frame-alist
+	      (append default-frame-alist
+		      '((user-size . t))
+		      (if height (list height))
+		      (if width (list width)))))
+    (if (or left top)
+	(setq initial-frame-alist
+	      (append initial-frame-alist
+		      '((user-position . t))
+		      (if left (list left))
+		      (if top (list top)))))
+    (setq x-invocation-args (cdr x-invocation-args))))
 
 (defun x-handle-name-rn-switch (switch)
   "Handle a \"-name\" or \"-rn\" SWITCH."
--- a/lisp/term/x-win.el	Sun Dec 23 06:46:19 2001 +0000
+++ b/lisp/term/x-win.el	Mon Dec 24 04:52:30 2001 +0000
@@ -127,15 +127,24 @@
 
 ;; Handle the geometry option
 (defun x-handle-geometry (switch)
-  (let ((geo (x-parse-geometry (car x-invocation-args))))
-    (setq initial-frame-alist
-	  (append initial-frame-alist
-		  (if (or (assq 'left geo) (assq 'top geo))
-		      '((user-position . t)))
-		  (if (or (assq 'height geo) (assq 'width geo))
-		      '((user-size . t)))
-		  geo)
-	  x-invocation-args (cdr x-invocation-args))))
+  (let* ((geo (x-parse-geometry (car x-invocation-args)))
+	 (left (assq 'left geo))
+	 (top (assq 'top geo))
+	 (height (assq 'height geo))
+	 (width (assq 'width geo)))
+    (if (or height width)
+	(setq default-frame-alist
+	      (append default-frame-alist
+		      '((user-size . t))
+		      (if height (list height))
+		      (if width (list width)))))
+    (if (or left top)
+	(setq initial-frame-alist
+	      (append initial-frame-alist
+		      '((user-position . t))
+		      (if left (list left))
+		      (if top (list top)))))
+    (setq x-invocation-args (cdr x-invocation-args))))
 
 ;; Handle the -name option.  Set the variable x-resource-name
 ;; to the option's operand; set the name of