aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1996-09-04 03:55:07 +0000
committerRichard M. Stallman1996-09-04 03:55:07 +0000
commitb839712d7794b146fdc9e05ad65d3097f8ac6d7b (patch)
tree14a038bbc72c9f7beb780fa2688cbb2c4eec6419 /src
parent1847b19b418ea91f8277327ce6296ad7416e81dd (diff)
downloademacs-b839712d7794b146fdc9e05ad65d3097f8ac6d7b.tar.gz
emacs-b839712d7794b146fdc9e05ad65d3097f8ac6d7b.zip
(x_set_frame_parameters): Make height and width ints.
Diffstat (limited to 'src')
-rw-r--r--src/w32fns.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index 04529ab8184..03497b7a321 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -587,7 +587,7 @@ x_set_frame_parameters (f, alist)
587 /* If both of these parameters are present, it's more efficient to 587 /* If both of these parameters are present, it's more efficient to
588 set them both at once. So we wait until we've looked at the 588 set them both at once. So we wait until we've looked at the
589 entire list before we set them. */ 589 entire list before we set them. */
590 Lisp_Object width, height; 590 int width, height;
591 591
592 /* Same here. */ 592 /* Same here. */
593 Lisp_Object left, top; 593 Lisp_Object left, top;
@@ -622,9 +622,13 @@ x_set_frame_parameters (f, alist)
622 i++; 622 i++;
623 } 623 }
624 624
625 width = height = top = left = Qunbound; 625 top = left = Qunbound;
626 icon_left = icon_top = Qunbound; 626 icon_left = icon_top = Qunbound;
627 627
628 /* Provide default values for HEIGHT and WIDTH. */
629 width = FRAME_WIDTH (f);
630 height = FRAME_HEIGHT (f);
631
628 /* Now process them in reverse of specified order. */ 632 /* Now process them in reverse of specified order. */
629 for (i--; i >= 0; i--) 633 for (i--; i >= 0; i--)
630 { 634 {
@@ -633,10 +637,10 @@ x_set_frame_parameters (f, alist)
633 prop = parms[i]; 637 prop = parms[i];
634 val = values[i]; 638 val = values[i];
635 639
636 if (EQ (prop, Qwidth)) 640 if (EQ (prop, Qwidth) && NUMBERP (val))
637 width = val; 641 width = XFASTINT (val);
638 else if (EQ (prop, Qheight)) 642 else if (EQ (prop, Qheight) && NUMBERP (val))
639 height = val; 643 height = XFASTINT (val);
640 else if (EQ (prop, Qtop)) 644 else if (EQ (prop, Qtop))
641 top = val; 645 top = val;
642 else if (EQ (prop, Qleft)) 646 else if (EQ (prop, Qleft))
@@ -693,12 +697,6 @@ x_set_frame_parameters (f, alist)
693 XSETINT (icon_top, 0); 697 XSETINT (icon_top, 0);
694 } 698 }
695 699
696 /* Don't die if just one of these was set. */
697 if (EQ (width, Qunbound))
698 XSETINT (width, FRAME_WIDTH (f));
699 if (EQ (height, Qunbound))
700 XSETINT (height, FRAME_HEIGHT (f));
701
702 /* Don't set these parameters unless they've been explicitly 700 /* Don't set these parameters unless they've been explicitly
703 specified. The window might be mapped or resized while we're in 701 specified. The window might be mapped or resized while we're in
704 this function, and we don't want to override that unless the lisp 702 this function, and we don't want to override that unless the lisp
@@ -714,9 +712,9 @@ x_set_frame_parameters (f, alist)
714 712
715 XSETFRAME (frame, f); 713 XSETFRAME (frame, f);
716 714
717 if ((NUMBERP (width) && XINT (width) != FRAME_WIDTH (f)) 715 if (XINT (width) != FRAME_WIDTH (f)
718 || (NUMBERP (height) && XINT (height) != FRAME_HEIGHT (f))) 716 || XINT (height) != FRAME_HEIGHT (f))
719 Fset_frame_size (frame, width, height); 717 Fset_frame_size (frame, make_number (width), make_number (height));
720 718
721 if ((!NILP (left) || !NILP (top)) 719 if ((!NILP (left) || !NILP (top))
722 && ! (left_no_change && top_no_change) 720 && ! (left_no_change && top_no_change)