Commit b3ba0aa8 authored by Kim F. Storm's avatar Kim F. Storm

(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
parent 976b73d7
......@@ -740,6 +740,7 @@ void x_set_border_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
void x_set_cursor_type P_ ((struct frame *, Lisp_Object, Lisp_Object));
void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object));
void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
static void x_set_fringe_width P_ ((struct frame *, Lisp_Object, Lisp_Object));
void x_set_font P_ ((struct frame *, Lisp_Object, Lisp_Object));
void x_set_border_width P_ ((struct frame *, Lisp_Object, Lisp_Object));
void x_set_internal_border_width P_ ((struct frame *, Lisp_Object,
......@@ -802,6 +803,8 @@ static struct x_frame_parm_table x_frame_parms[] =
"scroll-bar-background", x_set_scroll_bar_background,
"screen-gamma", x_set_screen_gamma,
"line-spacing", x_set_line_spacing,
"left-fringe", x_set_fringe_width,
"right-fringe", x_set_fringe_width,
"wait-for-wm", x_set_wait_for_wm
......@@ -896,13 +899,16 @@ x_set_frame_parameters (f, alist)
/* Process foreground_color and background_color before anything else.
They are independent of other properties, but other properties (e.g.,
cursor_color) are dependent upon them. */
/* Process default font as well, since fringe widths depends on it. */
for (p = 0; p < i; p++)
Lisp_Object prop, val;
prop = parms[p];
val = values[p];
if (EQ (prop, Qforeground_color) || EQ (prop, Qbackground_color))
if (EQ (prop, Qforeground_color)
|| EQ (prop, Qbackground_color)
|| EQ (prop, Qfont))
register Lisp_Object param_index, old_value;
......@@ -941,7 +947,9 @@ x_set_frame_parameters (f, alist)
icon_top = val;
else if (EQ (prop, Qicon_left))
icon_left = val;
else if (EQ (prop, Qforeground_color) || EQ (prop, Qbackground_color))
else if (EQ (prop, Qforeground_color)
|| EQ (prop, Qbackground_color)
|| EQ (prop, Qfont))
/* Processed above. */
......@@ -1904,6 +1912,14 @@ x_set_font (f, arg, oldval)
static void
x_set_fringe_width (f, new_value, old_value)
struct frame *f;
Lisp_Object new_value, old_value;
x_compute_fringe_widths (f, 1);
x_set_border_width (f, arg, oldval)
struct frame *f;
......@@ -3120,8 +3136,9 @@ x_figure_window_size (f, parms)
? 0
: (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.x->font)));
x_compute_fringe_widths (f, 0);
f->output_data.x->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width);
f->output_data.x->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height);
......@@ -4357,6 +4374,10 @@ This function is an internal primitive--use `make-frame' instead. */)
"screenGamma", "ScreenGamma", RES_TYPE_FLOAT);
x_default_parameter (f, parms, Qline_spacing, Qnil,
"lineSpacing", "LineSpacing", RES_TYPE_NUMBER);
x_default_parameter (f, parms, Qleft_fringe, Qnil,
"leftFringe", "LeftFringe", RES_TYPE_NUMBER);
x_default_parameter (f, parms, Qright_fringe, Qnil,
"rightFringe", "RightFringe", RES_TYPE_NUMBER);
x_default_scroll_bar_color_parameter (f, parms, Qscroll_bar_foreground,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment