aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1993-05-28 06:44:48 +0000
committerJim Blandy1993-05-28 06:44:48 +0000
commit312b93ee500d60acb4d75dd056f5fbd068f6b32a (patch)
tree8cc352fc81cc8a6a772fb01d8df57aad0c31395c /src
parent34aab3076f540c3acbd59b7b8a3a67ea7f3ebd3e (diff)
downloademacs-312b93ee500d60acb4d75dd056f5fbd068f6b32a.tar.gz
emacs-312b93ee500d60acb4d75dd056f5fbd068f6b32a.zip
* xfns.c (x_set_frame_parameters): Use the first
position/size parameter we find, not the last.
Diffstat (limited to 'src')
-rw-r--r--src/xfns.c23
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)
331 331
332 /* Same here. */ 332 /* Same here. */
333 Lisp_Object left, top; 333 Lisp_Object left, top;
334
335 XSET (width, Lisp_Int, FRAME_WIDTH (f));
336 XSET (height, Lisp_Int, FRAME_HEIGHT (f));
337 334
338 XSET (top, Lisp_Int, f->display.x->top_pos); 335 width = height = top = left = Qnil;
339 XSET (left, Lisp_Int, f->display.x->left_pos);
340 336
341 for (tail = alist; CONSP (tail); tail = Fcdr (tail)) 337 for (tail = alist; CONSP (tail); tail = Fcdr (tail))
342 { 338 {
@@ -346,13 +342,16 @@ x_set_frame_parameters (f, alist)
346 prop = Fcar (elt); 342 prop = Fcar (elt);
347 val = Fcdr (elt); 343 val = Fcdr (elt);
348 344
349 if (EQ (prop, Qwidth)) 345 /* Ignore all but the first set presented. You're supposed to
346 be able to append two parameter lists and have the first
347 shadow the second. */
348 if (EQ (prop, Qwidth) && NILP (width))
350 width = val; 349 width = val;
351 else if (EQ (prop, Qheight)) 350 else if (EQ (prop, Qheight) && NILP (height))
352 height = val; 351 height = val;
353 else if (EQ (prop, Qtop)) 352 else if (EQ (prop, Qtop) && NILP (top))
354 top = val; 353 top = val;
355 else if (EQ (prop, Qleft)) 354 else if (EQ (prop, Qleft) && NILP (left))
356 left = val; 355 left = val;
357 else 356 else
358 { 357 {
@@ -373,6 +372,12 @@ x_set_frame_parameters (f, alist)
373 { 372 {
374 Lisp_Object frame; 373 Lisp_Object frame;
375 374
375 if (NILP (width)) XSET (width, Lisp_Int, FRAME_WIDTH (f));
376 if (NILP (height)) XSET (height, Lisp_Int, FRAME_HEIGHT (f));
377
378 if (NILP (top)) XSET (top, Lisp_Int, f->display.x->top_pos);
379 if (NILP (left)) XSET (left, Lisp_Int, f->display.x->left_pos);
380
376 XSET (frame, Lisp_Frame, f); 381 XSET (frame, Lisp_Frame, f);
377 if (XINT (width) != FRAME_WIDTH (f) 382 if (XINT (width) != FRAME_WIDTH (f)
378 || XINT (height) != FRAME_HEIGHT (f)) 383 || XINT (height) != FRAME_HEIGHT (f))