2003-06-26 Jan Dj\e,Ad\e(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.
a newly-created, never-selected window. */
XSETFASTINT (XWINDOW (f->selected_window)->use_time, ++window_select_count);
+ f->default_face_done_p = 0;
+
return f;
}
\f
/* 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
xfree (font);
}
+ f->default_face_done_p = 0;
Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font_name), Qnil));
}
}
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 */