Commit a5f696ac authored by Jan Djärv's avatar Jan Djärv

Fix some of the font/face problems.

parent cffcede7
2003-06-26 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* xfaces.c (set_font_frame_param): Set default_face_done_p to zero.
(realize_default_face): Use default_face_done_p for the force_p
argument to set_lface_from_font_name. Set default_face_done_p to
one.
* frame.c (make_frame): Initialize default_face_done_p.
* frame.h (struct frame): Add default_face_done_p.
* config.in: Add XRegisterIMInstantiateCallback_arg6 so it
will be defined.
......
......@@ -372,6 +372,8 @@ make_frame (mini_p)
a newly-created, never-selected window. */
XSETFASTINT (XWINDOW (f->selected_window)->use_time, ++window_select_count);
f->default_face_done_p = 0;
return f;
}
......
......@@ -451,6 +451,11 @@ struct frame
/* Set to non-zero in change_frame_size when size of frame changed
Clear the frame in clear_garbaged_frames if set. */
unsigned resized_p : 1;
/* Set to non-zero if the default face for the frame has been
realized. Reset to zero whenever the default face changes.
Used to see the difference between a font change and face change. */
unsigned default_face_done_p : 1;
};
#ifdef MULTI_KBOARD
......
......@@ -4340,6 +4340,7 @@ set_font_frame_param (frame, lface)
xfree (font);
}
f->default_face_done_p = 0;
Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font_name), Qnil));
}
}
......@@ -6586,9 +6587,9 @@ realize_default_face (f)
frame_font = Fassq (Qfont, f->param_alist);
xassert (CONSP (frame_font) && STRINGP (XCDR (frame_font)));
frame_font = XCDR (frame_font);
/* Specify 0 for FORCE_P here, so that we don't override
a :family attribute specified for `default' for new frames. */
set_lface_from_font_name (f, lface, frame_font, 0, 1);
set_lface_from_font_name (f, lface, frame_font,
f->default_face_done_p, 1);
f->default_face_done_p = 1;
}
#endif /* HAVE_WINDOW_SYSTEM */
......
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