aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/frame.el23
1 files changed, 18 insertions, 5 deletions
diff --git a/lisp/frame.el b/lisp/frame.el
index 1b7ef4a1ba7..915c96c43dc 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -112,6 +112,8 @@ These supersede the values given in `default-frame-alist'.")
112;; Record the parameters used in frame-initialize to make the initial frame. 112;; Record the parameters used in frame-initialize to make the initial frame.
113(defvar frame-initial-frame-alist) 113(defvar frame-initial-frame-alist)
114 114
115(defvar frame-initial-geometry-arguments nil)
116
115;;; startup.el calls this function before loading the user's init 117;;; startup.el calls this function before loading the user's init
116;;; file - if there is no frame with a minibuffer open now, create 118;;; file - if there is no frame with a minibuffer open now, create
117;;; one to display messages while loading the init file. 119;;; one to display messages while loading the init file.
@@ -187,8 +189,15 @@ These supersede the values given in `default-frame-alist'.")
187 nil)) 189 nil))
188 ;; Get rid of `reverse', because that was handled 190 ;; Get rid of `reverse', because that was handled
189 ;; when we first made the frame. 191 ;; when we first made the frame.
190 (new (make-frame (cons '(reverse . nil) 192 (new (make-frame
191 (delq (assq 'reverse parms) parms))))) 193 ;; Use the geometry args that created the existing
194 ;; frame, rather than the parms we get for it.q
195 (append frame-initial-geometry-arguments
196 (let (frame-initial-geometry-arguments)
197 (frame-remove-geometry-params
198 (cons '(reverse . nil)
199 (delq (assq 'reverse parms)
200 parms))))))))
192 ;; The initial frame, which we are about to delete, may be 201 ;; The initial frame, which we are about to delete, may be
193 ;; the only frame with a minibuffer. If it is, create a 202 ;; the only frame with a minibuffer. If it is, create a
194 ;; new one. 203 ;; new one.
@@ -352,15 +361,19 @@ additional frame parameters that Emacs recognizes for X window frames."
352(defun frame-remove-geometry-params (param-list) 361(defun frame-remove-geometry-params (param-list)
353 "Return the parameter list PARAM-LIST, but with geometry specs removed. 362 "Return the parameter list PARAM-LIST, but with geometry specs removed.
354This deletes all bindings in PARAM-LIST for `top', `left', `width', 363This deletes all bindings in PARAM-LIST for `top', `left', `width',
355and `height' parameters. 364`height', `user-size' and `user-position' parameters.
356Emacs uses this to avoid overriding explicit moves and resizings from 365Emacs uses this to avoid overriding explicit moves and resizings from
357the user during startup." 366the user during startup."
358 (setq param-list (cons nil param-list)) 367 (setq param-list (cons nil param-list))
359 (let ((tail param-list)) 368 (let ((tail param-list))
360 (while (consp (cdr tail)) 369 (while (consp (cdr tail))
361 (if (and (consp (car (cdr tail))) 370 (if (and (consp (car (cdr tail)))
362 (memq (car (car (cdr tail))) '(height width top left))) 371 (memq (car (car (cdr tail)))
363 (setcdr tail (cdr (cdr tail))) 372 '(height width top left user-position user-size)))
373 (progn
374 (setq frame-initial-geometry-arguments
375 (cons (car (cdr tail)) frame-initial-geometry-arguments))
376 (setcdr tail (cdr (cdr tail))))
364 (setq tail (cdr tail))))) 377 (setq tail (cdr tail)))))
365 (cdr param-list)) 378 (cdr param-list))
366 379