Mercurial > emacs
changeset 11927:20eae371b3f0
(x-create-frame-with-faces): Read geometry resource
and use that while creating the frame.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 26 May 1995 03:54:38 +0000 |
parents | 40d7e6f04ebe |
children | ed1176437be9 |
files | lisp/faces.el |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/faces.el Fri May 26 03:21:30 1995 +0000 +++ b/lisp/faces.el Fri May 26 03:54:38 1995 +0000 @@ -938,6 +938,24 @@ ;; Like x-create-frame but also set up the faces. (defun x-create-frame-with-faces (&optional parameters) + ;; Read this frame's geometry resource, if it has an explicit name, + ;; and put the specs into PARAMETERS. + (let* ((name (or (cdr (assq 'name parameters)) + (cdr (assq 'name default-frame-alist)) + (cdr (assq 'name initial-frame-alist)))) + (x-resource-name name) + (res-geometry (x-get-resource "geometry" "Geometry")) + parsed) + (if res-geometry + (progn + (setq parsed (x-parse-geometry res-geometry)) + ;; If the resource specifies a position, + ;; call the position and size "user-specified". + (if (or (assq 'top parsed) (assq 'left parsed)) + (setq parsed (cons '(user-position . t) + (cons '(user-size . t) parsed)))) + ;; All geometry parms apply to the initial frame. + (setq parameters (append parameters parsed))))) (if (null global-face-data) (x-create-frame parameters) (let* ((visibility-spec (assq 'visibility parameters))