aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/w32fns.c34
1 files changed, 26 insertions, 8 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index bad08848023..b6f94e499c4 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -53,6 +53,7 @@ Boston, MA 02111-1307, USA. */
53#include <ctype.h> 53#include <ctype.h>
54 54
55extern void free_frame_menubar (); 55extern void free_frame_menubar ();
56extern void x_compute_fringe_widths (struct frame *, int);
56extern double atof (); 57extern double atof ();
57extern int w32_console_toggle_lock_key (int vk_code, Lisp_Object new_state); 58extern int w32_console_toggle_lock_key (int vk_code, Lisp_Object new_state);
58extern void w32_menu_display_help (HWND owner, HMENU menu, UINT menu_item, UINT flags); 59extern void w32_menu_display_help (HWND owner, HMENU menu, UINT menu_item, UINT flags);
@@ -676,6 +677,7 @@ void x_set_cursor_type P_ ((struct frame *, Lisp_Object, Lisp_Object));
676void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object)); 677void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object));
677void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object)); 678void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
678void x_set_font P_ ((struct frame *, Lisp_Object, Lisp_Object)); 679void x_set_font P_ ((struct frame *, Lisp_Object, Lisp_Object));
680static void x_set_fringe_width P_ ((struct frame *, Lisp_Object, Lisp_Object));
679void x_set_border_width P_ ((struct frame *, Lisp_Object, Lisp_Object)); 681void x_set_border_width P_ ((struct frame *, Lisp_Object, Lisp_Object));
680void x_set_internal_border_width P_ ((struct frame *, Lisp_Object, 682void x_set_internal_border_width P_ ((struct frame *, Lisp_Object,
681 Lisp_Object)); 683 Lisp_Object));
@@ -718,7 +720,10 @@ static struct x_frame_parm_table x_frame_parms[] =
718 "visibility", x_set_visibility, 720 "visibility", x_set_visibility,
719 "tool-bar-lines", x_set_tool_bar_lines, 721 "tool-bar-lines", x_set_tool_bar_lines,
720 "screen-gamma", x_set_screen_gamma, 722 "screen-gamma", x_set_screen_gamma,
721 "line-spacing", x_set_line_spacing 723 "line-spacing", x_set_line_spacing,
724 "left-fringe", x_set_fringe_width,
725 "right-fringe", x_set_fringe_width
726
722}; 727};
723 728
724/* Attach the `x-frame-parameter' properties to 729/* Attach the `x-frame-parameter' properties to
@@ -810,13 +815,16 @@ x_set_frame_parameters (f, alist)
810 /* Process foreground_color and background_color before anything else. 815 /* Process foreground_color and background_color before anything else.
811 They are independent of other properties, but other properties (e.g., 816 They are independent of other properties, but other properties (e.g.,
812 cursor_color) are dependent upon them. */ 817 cursor_color) are dependent upon them. */
818 /* Process default font as well, since fringe widths depends on it. */
813 for (p = 0; p < i; p++) 819 for (p = 0; p < i; p++)
814 { 820 {
815 Lisp_Object prop, val; 821 Lisp_Object prop, val;
816 822
817 prop = parms[p]; 823 prop = parms[p];
818 val = values[p]; 824 val = values[p];
819 if (EQ (prop, Qforeground_color) || EQ (prop, Qbackground_color)) 825 if (EQ (prop, Qforeground_color)
826 || EQ (prop, Qbackground_color)
827 || EQ (prop, Qfont))
820 { 828 {
821 register Lisp_Object param_index, old_value; 829 register Lisp_Object param_index, old_value;
822 830
@@ -855,7 +863,9 @@ x_set_frame_parameters (f, alist)
855 icon_top = val; 863 icon_top = val;
856 else if (EQ (prop, Qicon_left)) 864 else if (EQ (prop, Qicon_left))
857 icon_left = val; 865 icon_left = val;
858 else if (EQ (prop, Qforeground_color) || EQ (prop, Qbackground_color)) 866 else if (EQ (prop, Qforeground_color)
867 || EQ (prop, Qbackground_color)
868 || EQ (prop, Qfont))
859 /* Processed above. */ 869 /* Processed above. */
860 continue; 870 continue;
861 else 871 else
@@ -2438,6 +2448,14 @@ x_set_font (f, arg, oldval)
2438 } 2448 }
2439} 2449}
2440 2450
2451static void
2452x_set_fringe_width (f, new_value, old_value)
2453 struct frame *f;
2454 Lisp_Object new_value, old_value;
2455{
2456 x_compute_fringe_widths (f, 1);
2457}
2458
2441void 2459void
2442x_set_border_width (f, arg, oldval) 2460x_set_border_width (f, arg, oldval)
2443 struct frame *f; 2461 struct frame *f;
@@ -3248,8 +3266,7 @@ x_figure_window_size (f, parms)
3248 : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0 3266 : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0
3249 ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f) 3267 ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f)
3250 : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.w32->font))); 3268 : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.w32->font)));
3251 f->output_data.w32->fringes_extra 3269 x_compute_fringe_widths (f, 0);
3252 = FRAME_FRINGE_WIDTH (f);
3253 f->output_data.w32->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width); 3270 f->output_data.w32->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width);
3254 f->output_data.w32->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height); 3271 f->output_data.w32->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height);
3255 3272
@@ -5449,6 +5466,10 @@ This function is an internal primitive--use `make-frame' instead. */)
5449 "screenGamma", "ScreenGamma", RES_TYPE_FLOAT); 5466 "screenGamma", "ScreenGamma", RES_TYPE_FLOAT);
5450 x_default_parameter (f, parms, Qline_spacing, Qnil, 5467 x_default_parameter (f, parms, Qline_spacing, Qnil,
5451 "lineSpacing", "LineSpacing", RES_TYPE_NUMBER); 5468 "lineSpacing", "LineSpacing", RES_TYPE_NUMBER);
5469 x_default_parameter (f, parms, Qleft_fringe, Qnil,
5470 "leftFringe", "LeftFringe", RES_TYPE_NUMBER);
5471 x_default_parameter (f, parms, Qright_fringe, Qnil,
5472 "rightFringe", "RightFringe", RES_TYPE_NUMBER);
5452 5473
5453 5474
5454 /* Init faces before x_default_parameter is called for scroll-bar 5475 /* Init faces before x_default_parameter is called for scroll-bar
@@ -13237,9 +13258,6 @@ x_create_tip_frame (dpyinfo, parms, text)
13237 f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window; 13258 f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window;
13238 window_prompting = x_figure_window_size (f, parms); 13259 window_prompting = x_figure_window_size (f, parms);
13239 13260
13240 /* No fringes on tip frame. */
13241 f->output_data.w32->fringes_extra = 0;
13242
13243 if (window_prompting & XNegative) 13261 if (window_prompting & XNegative)
13244 { 13262 {
13245 if (window_prompting & YNegative) 13263 if (window_prompting & YNegative)