diff options
| author | Jim Blandy <jimb@redhat.com> | 1993-05-28 06:44:48 +0000 |
|---|---|---|
| committer | Jim Blandy <jimb@redhat.com> | 1993-05-28 06:44:48 +0000 |
| commit | 312b93ee500d60acb4d75dd056f5fbd068f6b32a (patch) | |
| tree | 8cc352fc81cc8a6a772fb01d8df57aad0c31395c | |
| parent | 34aab3076f540c3acbd59b7b8a3a67ea7f3ebd3e (diff) | |
| download | emacs-312b93ee500d60acb4d75dd056f5fbd068f6b32a.tar.gz | |
* xfns.c (x_set_frame_parameters): Use the first
position/size parameter we find, not the last.
| -rw-r--r-- | src/xfns.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/xfns.c b/src/xfns.c index 4614b97ba1d..95932dbe345 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -331,12 +331,8 @@ x_set_frame_parameters (f, alist) /* Same here. */ Lisp_Object left, top; - - XSET (width, Lisp_Int, FRAME_WIDTH (f)); - XSET (height, Lisp_Int, FRAME_HEIGHT (f)); - XSET (top, Lisp_Int, f->display.x->top_pos); - XSET (left, Lisp_Int, f->display.x->left_pos); + width = height = top = left = Qnil; for (tail = alist; CONSP (tail); tail = Fcdr (tail)) { @@ -346,13 +342,16 @@ x_set_frame_parameters (f, alist) prop = Fcar (elt); val = Fcdr (elt); - if (EQ (prop, Qwidth)) + /* Ignore all but the first set presented. You're supposed to + be able to append two parameter lists and have the first + shadow the second. */ + if (EQ (prop, Qwidth) && NILP (width)) width = val; - else if (EQ (prop, Qheight)) + else if (EQ (prop, Qheight) && NILP (height)) height = val; - else if (EQ (prop, Qtop)) + else if (EQ (prop, Qtop) && NILP (top)) top = val; - else if (EQ (prop, Qleft)) + else if (EQ (prop, Qleft) && NILP (left)) left = val; else { @@ -373,6 +372,12 @@ x_set_frame_parameters (f, alist) { Lisp_Object frame; + if (NILP (width)) XSET (width, Lisp_Int, FRAME_WIDTH (f)); + if (NILP (height)) XSET (height, Lisp_Int, FRAME_HEIGHT (f)); + + if (NILP (top)) XSET (top, Lisp_Int, f->display.x->top_pos); + if (NILP (left)) XSET (left, Lisp_Int, f->display.x->left_pos); + XSET (frame, Lisp_Frame, f); if (XINT (width) != FRAME_WIDTH (f) || XINT (height) != FRAME_HEIGHT (f)) |
