diff options
| author | Kim F. Storm | 2001-12-01 01:23:29 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2001-12-01 01:23:29 +0000 |
| commit | b3ba0aa8a050382e92dc8eb4edc3676707786290 (patch) | |
| tree | 11883658859f26e628e6374f90dae6ac792a7e11 /src | |
| parent | 976b73d7c114510fe950e803142b278bf924e7cc (diff) | |
| download | emacs-b3ba0aa8a050382e92dc8eb4edc3676707786290.tar.gz emacs-b3ba0aa8a050382e92dc8eb4edc3676707786290.zip | |
(x_frame_parms): Add `left-fringe' and `right-fringe' parms.
(x_set_frame_parameters): Process Process `font' parameter before other
parameters as fringe widths depend on it.
(x_set_fringe_width): New function.
(x_figure_window_size): Use x_compute_fringe_widths.
(Fx_create_frame): Process `left-fringe' and `right-fringe' frame
parameters.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/src/xfns.c b/src/xfns.c index dd829dc4cb2..50520b53458 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -740,6 +740,7 @@ void x_set_border_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); | |||
| 740 | void x_set_cursor_type P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 740 | void x_set_cursor_type P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 741 | void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 741 | void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 742 | void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 742 | void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 743 | static void x_set_fringe_width P_ ((struct frame *, Lisp_Object, Lisp_Object)); | ||
| 743 | void x_set_font P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 744 | void x_set_font P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 744 | void x_set_border_width P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 745 | void x_set_border_width P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 745 | void x_set_internal_border_width P_ ((struct frame *, Lisp_Object, | 746 | void x_set_internal_border_width P_ ((struct frame *, Lisp_Object, |
| @@ -802,6 +803,8 @@ static struct x_frame_parm_table x_frame_parms[] = | |||
| 802 | "scroll-bar-background", x_set_scroll_bar_background, | 803 | "scroll-bar-background", x_set_scroll_bar_background, |
| 803 | "screen-gamma", x_set_screen_gamma, | 804 | "screen-gamma", x_set_screen_gamma, |
| 804 | "line-spacing", x_set_line_spacing, | 805 | "line-spacing", x_set_line_spacing, |
| 806 | "left-fringe", x_set_fringe_width, | ||
| 807 | "right-fringe", x_set_fringe_width, | ||
| 805 | "wait-for-wm", x_set_wait_for_wm | 808 | "wait-for-wm", x_set_wait_for_wm |
| 806 | }; | 809 | }; |
| 807 | 810 | ||
| @@ -896,13 +899,16 @@ x_set_frame_parameters (f, alist) | |||
| 896 | /* Process foreground_color and background_color before anything else. | 899 | /* Process foreground_color and background_color before anything else. |
| 897 | They are independent of other properties, but other properties (e.g., | 900 | They are independent of other properties, but other properties (e.g., |
| 898 | cursor_color) are dependent upon them. */ | 901 | cursor_color) are dependent upon them. */ |
| 902 | /* Process default font as well, since fringe widths depends on it. */ | ||
| 899 | for (p = 0; p < i; p++) | 903 | for (p = 0; p < i; p++) |
| 900 | { | 904 | { |
| 901 | Lisp_Object prop, val; | 905 | Lisp_Object prop, val; |
| 902 | 906 | ||
| 903 | prop = parms[p]; | 907 | prop = parms[p]; |
| 904 | val = values[p]; | 908 | val = values[p]; |
| 905 | if (EQ (prop, Qforeground_color) || EQ (prop, Qbackground_color)) | 909 | if (EQ (prop, Qforeground_color) |
| 910 | || EQ (prop, Qbackground_color) | ||
| 911 | || EQ (prop, Qfont)) | ||
| 906 | { | 912 | { |
| 907 | register Lisp_Object param_index, old_value; | 913 | register Lisp_Object param_index, old_value; |
| 908 | 914 | ||
| @@ -941,7 +947,9 @@ x_set_frame_parameters (f, alist) | |||
| 941 | icon_top = val; | 947 | icon_top = val; |
| 942 | else if (EQ (prop, Qicon_left)) | 948 | else if (EQ (prop, Qicon_left)) |
| 943 | icon_left = val; | 949 | icon_left = val; |
| 944 | else if (EQ (prop, Qforeground_color) || EQ (prop, Qbackground_color)) | 950 | else if (EQ (prop, Qforeground_color) |
| 951 | || EQ (prop, Qbackground_color) | ||
| 952 | || EQ (prop, Qfont)) | ||
| 945 | /* Processed above. */ | 953 | /* Processed above. */ |
| 946 | continue; | 954 | continue; |
| 947 | else | 955 | else |
| @@ -1904,6 +1912,14 @@ x_set_font (f, arg, oldval) | |||
| 1904 | } | 1912 | } |
| 1905 | } | 1913 | } |
| 1906 | 1914 | ||
| 1915 | static void | ||
| 1916 | x_set_fringe_width (f, new_value, old_value) | ||
| 1917 | struct frame *f; | ||
| 1918 | Lisp_Object new_value, old_value; | ||
| 1919 | { | ||
| 1920 | x_compute_fringe_widths (f, 1); | ||
| 1921 | } | ||
| 1922 | |||
| 1907 | void | 1923 | void |
| 1908 | x_set_border_width (f, arg, oldval) | 1924 | x_set_border_width (f, arg, oldval) |
| 1909 | struct frame *f; | 1925 | struct frame *f; |
| @@ -3120,8 +3136,9 @@ x_figure_window_size (f, parms) | |||
| 3120 | = (!FRAME_HAS_VERTICAL_SCROLL_BARS (f) | 3136 | = (!FRAME_HAS_VERTICAL_SCROLL_BARS (f) |
| 3121 | ? 0 | 3137 | ? 0 |
| 3122 | : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.x->font))); | 3138 | : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.x->font))); |
| 3123 | f->output_data.x->fringes_extra | 3139 | |
| 3124 | = FRAME_FRINGE_WIDTH (f); | 3140 | x_compute_fringe_widths (f, 0); |
| 3141 | |||
| 3125 | f->output_data.x->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width); | 3142 | f->output_data.x->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width); |
| 3126 | f->output_data.x->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height); | 3143 | f->output_data.x->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height); |
| 3127 | 3144 | ||
| @@ -4357,6 +4374,10 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 4357 | "screenGamma", "ScreenGamma", RES_TYPE_FLOAT); | 4374 | "screenGamma", "ScreenGamma", RES_TYPE_FLOAT); |
| 4358 | x_default_parameter (f, parms, Qline_spacing, Qnil, | 4375 | x_default_parameter (f, parms, Qline_spacing, Qnil, |
| 4359 | "lineSpacing", "LineSpacing", RES_TYPE_NUMBER); | 4376 | "lineSpacing", "LineSpacing", RES_TYPE_NUMBER); |
| 4377 | x_default_parameter (f, parms, Qleft_fringe, Qnil, | ||
| 4378 | "leftFringe", "LeftFringe", RES_TYPE_NUMBER); | ||
| 4379 | x_default_parameter (f, parms, Qright_fringe, Qnil, | ||
| 4380 | "rightFringe", "RightFringe", RES_TYPE_NUMBER); | ||
| 4360 | 4381 | ||
| 4361 | x_default_scroll_bar_color_parameter (f, parms, Qscroll_bar_foreground, | 4382 | x_default_scroll_bar_color_parameter (f, parms, Qscroll_bar_foreground, |
| 4362 | "scrollBarForeground", | 4383 | "scrollBarForeground", |