Mercurial > emacs
comparison src/xfns.c @ 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 | c3c1b1ceab05 |
children | 03e4cad68481 |
comparison
equal
deleted
inserted
replaced
3202:dda1a74daff6 | 3203:1055aa1b7547 |
---|---|
329 entire list before we set them. */ | 329 entire list before we set them. */ |
330 Lisp_Object width, height; | 330 Lisp_Object width, height; |
331 | 331 |
332 /* Same here. */ | 332 /* Same here. */ |
333 Lisp_Object left, top; | 333 Lisp_Object left, top; |
334 | 334 |
335 XSET (width, Lisp_Int, FRAME_WIDTH (f)); | 335 width = height = top = left = Qnil; |
336 XSET (height, Lisp_Int, FRAME_HEIGHT (f)); | |
337 | |
338 XSET (top, Lisp_Int, f->display.x->top_pos); | |
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 { |
343 Lisp_Object elt, prop, val; | 339 Lisp_Object elt, prop, val; |
344 | 340 |
345 elt = Fcar (tail); | 341 elt = Fcar (tail); |
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 { |
359 register Lisp_Object param_index = Fget (prop, Qx_frame_parameter); | 358 register Lisp_Object param_index = Fget (prop, Qx_frame_parameter); |
360 register Lisp_Object old_value = get_frame_param (f, prop); | 359 register Lisp_Object old_value = get_frame_param (f, prop); |
370 | 369 |
371 /* Don't call these unless they've changed; the window may not actually | 370 /* Don't call these unless they've changed; the window may not actually |
372 exist yet. */ | 371 exist yet. */ |
373 { | 372 { |
374 Lisp_Object frame; | 373 Lisp_Object frame; |
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); | |
375 | 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)) |
379 Fset_frame_size (frame, width, height); | 384 Fset_frame_size (frame, width, height); |