summaryrefslogtreecommitdiff
path: root/lisp/faces.el
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1995-05-26 03:54:38 +0000
committerKarl Heuer <kwzh@gnu.org>1995-05-26 03:54:38 +0000
commita51384b8f1e31ec1090b97dd409844b494a6f4f6 (patch)
tree45281766f23877c3937648e8420c3b52de2635bb /lisp/faces.el
parente60c15275b1fd3cdffca2bf5a8ade85a8411c080 (diff)
downloademacs-a51384b8f1e31ec1090b97dd409844b494a6f4f6.tar.gz
(x-create-frame-with-faces): Read geometry resource
and use that while creating the frame.
Diffstat (limited to 'lisp/faces.el')
-rw-r--r--lisp/faces.el18
1 files changed, 18 insertions, 0 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index c5ab9b6623f..aa14e62b72c 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -938,6 +938,24 @@ selected frame."
;; 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))