comparison src/w32fns.c @ 25289:64b742df49ca

(x_set_frame_parameters): Set foreground and background first, and then set other parameters that might depend upon their new values.
author Geoff Voelker <voelker@cs.washington.edu>
date Mon, 16 Aug 1999 18:32:29 +0000
parents 98c67187cd6b
children 9154af188477
comparison
equal deleted inserted replaced
25288:65dbd144132d 25289:64b742df49ca
692 Lisp_Object icon_left, icon_top; 692 Lisp_Object icon_left, icon_top;
693 693
694 /* Record in these vectors all the parms specified. */ 694 /* Record in these vectors all the parms specified. */
695 Lisp_Object *parms; 695 Lisp_Object *parms;
696 Lisp_Object *values; 696 Lisp_Object *values;
697 int i; 697 int i, p;
698 int left_no_change = 0, top_no_change = 0; 698 int left_no_change = 0, top_no_change = 0;
699 int icon_left_no_change = 0, icon_top_no_change = 0; 699 int icon_left_no_change = 0, icon_top_no_change = 0;
700 700
701 struct gcpro gcpro1, gcpro2; 701 struct gcpro gcpro1, gcpro2;
702 702
733 icon_left = icon_top = Qunbound; 733 icon_left = icon_top = Qunbound;
734 734
735 /* Provide default values for HEIGHT and WIDTH. */ 735 /* Provide default values for HEIGHT and WIDTH. */
736 width = FRAME_WIDTH (f); 736 width = FRAME_WIDTH (f);
737 height = FRAME_HEIGHT (f); 737 height = FRAME_HEIGHT (f);
738
739 /* Process foreground_color and background_color before anything else.
740 They are independent of other properties, but other properties (e.g.,
741 cursor_color) are dependent upon them. */
742 for (p = 0; p < i; p++)
743 {
744 Lisp_Object prop, val;
745
746 prop = parms[p];
747 val = values[p];
748 if (EQ (prop, Qforeground_color) || EQ (prop, Qbackground_color))
749 {
750 register Lisp_Object param_index, old_value;
751
752 param_index = Fget (prop, Qx_frame_parameter);
753 old_value = get_frame_param (f, prop);
754 store_frame_param (f, prop, val);
755 if (NATNUMP (param_index)
756 && (XFASTINT (param_index)
757 < sizeof (x_frame_parms)/sizeof (x_frame_parms[0])))
758 (*x_frame_parms[XINT (param_index)].setter)(f, val, old_value);
759 }
760 }
738 761
739 /* Now process them in reverse of specified order. */ 762 /* Now process them in reverse of specified order. */
740 for (i--; i >= 0; i--) 763 for (i--; i >= 0; i--)
741 { 764 {
742 Lisp_Object prop, val; 765 Lisp_Object prop, val;
754 left = val; 777 left = val;
755 else if (EQ (prop, Qicon_top)) 778 else if (EQ (prop, Qicon_top))
756 icon_top = val; 779 icon_top = val;
757 else if (EQ (prop, Qicon_left)) 780 else if (EQ (prop, Qicon_left))
758 icon_left = val; 781 icon_left = val;
782 else if (EQ (prop, Qforeground_color) || EQ (prop, Qbackground_color))
783 /* Processed above. */
784 continue;
759 else 785 else
760 { 786 {
761 register Lisp_Object param_index, old_value; 787 register Lisp_Object param_index, old_value;
762 788
763 param_index = Fget (prop, Qx_frame_parameter); 789 param_index = Fget (prop, Qx_frame_parameter);