changeset 3203:1055aa1b7547

* xfns.c (x_set_frame_parameters): Use the first position/size parameter we find, not the last.
author Jim Blandy <jimb@redhat.com>
date Fri, 28 May 1993 06:44:48 +0000
parents dda1a74daff6
children a3007f83650c
files src/xfns.c
diffstat 1 files changed, 15 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Fri May 28 06:13:16 1993 +0000
+++ b/src/xfns.c	Fri May 28 06:44:48 1993 +0000
@@ -331,12 +331,8 @@
 
   /* 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 @@
       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 @@
   {
     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))