Lisp_Object string)
{
ptrdiff_t count = SPECPDL_INDEX ();
-#ifdef HAVE_WINDOW_SYSTEM
struct frame *f = XFRAME (win->frame);
-#else
- (void) XFRAME (win->frame);
-#endif
Lisp_Object pos = make_number (charpos);
ptrdiff_t to;
ptrdiff_t pt = PT, pt_byte = PT_BYTE;
if (len <= 0)
return unbind_to (count, Qnil);
to = limit = charpos + len;
-#ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (f))
{
font_object = font_range (charpos, bytepos, &to, win, face, string);
return unbind_to (count, Qnil);
}
else
-#endif /* not HAVE_WINDOW_SYSTEM */
font_object = win->frame;
lgstring = Fcomposition_get_gstring (pos, make_number (to), font_object,
string);
extern void _DebPrint (const char *fmt, ...);
# define DebPrint(stuff) _DebPrint stuff
# else
-/* Avoid compiler warnings about empty body of 'if' statement. */
-# define DebPrint(stuff) do {} while (false)
+# define DebPrint(stuff) ((void) 0)
# endif
#endif
#ifdef HAVE_WINDOW_SYSTEM
# include <time.h>
+# include "fontset.h"
#endif
#ifndef HAVE_WINDOW_SYSTEM
? FACE_FROM_ID (F, ID) \
: NULL)
+/* True if FACE is suitable for displaying ASCII characters. */
+INLINE bool
+FACE_SUITABLE_FOR_ASCII_CHAR_P (struct face *face)
+{
#ifdef HAVE_WINDOW_SYSTEM
-
-/* Non-zero if FACE is suitable for displaying character CHAR. */
-
-#define FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE, CHAR) \
- ((FACE) == (FACE)->ascii_face)
+ return face == face->ascii_face;
+#else
+ return true;
+#endif
+}
/* Return the id of the realized face on frame F that is like the face
- FACE, but is suitable for displaying character CHAR at buffer or
+ FACE, but is suitable for displaying character CHARACTER at buffer or
string position POS. OBJECT is the string object, or nil for
buffer. This macro is only meaningful for multibyte character
CHAR. */
-
-#define FACE_FOR_CHAR(F, FACE, CHAR, POS, OBJECT) \
- face_for_char ((F), (FACE), (CHAR), (POS), (OBJECT))
-
-#else /* not HAVE_WINDOW_SYSTEM */
-
-#define FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE, CHAR) \
- ((void) (FACE), (void) (CHAR), true)
-#define FACE_FOR_CHAR(F, FACE, CHAR, POS, OBJECT) \
- ((void) (F), (void) (FACE), (void) (CHAR), (void) (POS), \
- (void) (OBJECT), (FACE)->id)
-
-#endif /* not HAVE_WINDOW_SYSTEM */
+INLINE int
+FACE_FOR_CHAR (struct frame *f, struct face *face, int character,
+ ptrdiff_t pos, Lisp_Object object)
+{
+#ifdef HAVE_WINDOW_SYSTEM
+ return face_for_char (f, face, character, pos, object);
+#else
+ return face->id;
+#endif
+}
/* Return true if G contains a valid character code. */
INLINE bool
}
#ifdef HAVE_WINDOW_SYSTEM
-
bool
-window_system_available (struct frame *f)
+display_available (void)
{
- return f ? FRAME_WINDOW_P (f) || FRAME_MSDOS_P (f) : x_display_list != NULL;
+ return x_display_list != NULL;
}
+#endif
struct frame *
decode_window_system_frame (Lisp_Object frame)
{
struct frame *f = decode_live_frame (frame);
-
- if (!window_system_available (f))
- error ("Window system frame should be used");
+ check_window_system (f);
+#ifdef HAVE_WINDOW_SYSTEM
return f;
+#endif
}
-#else /* not HAVE_WINDOW_SYSTEM */
-
-_Noreturn void
-decode_window_system_frame (Lisp_Object frame)
-{
- error ("Window system is not in use");
-}
-
-_Noreturn
-#endif /* not HAVE_WINDOW_SYSTEM */
void
check_window_system (struct frame *f)
{
- if (!window_system_available (f))
- error (f ? "Window system frame should be used"
- : "Window system is not in use or not initialized");
+#ifdef HAVE_WINDOW_SYSTEM
+ if (window_system_available (f))
+ return;
+#endif
+ error (f ? "Window system frame should be used"
+ : "Window system is not in use or not initialized");
}
/* Return the value of frame parameter PROP in frame FRAME. */
If omitted, FRAME defaults to the currently selected frame. */)
(Lisp_Object frame)
{
-#ifdef HAVE_WINDOW_SYSTEM
struct frame *f = decode_live_frame (frame);
-#else
- (void) decode_live_frame (frame);
-#endif
/* Don't allow minibuf_window to remain on an iconified frame. */
check_minibuf_window (frame, EQ (minibuf_window, selected_window));
/* I think this should be done with a hook. */
-#ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (f))
+ {
+#ifdef HAVE_WINDOW_SYSTEM
x_iconify_frame (f);
#endif
+ }
/* Make menu bar update for the Buffers and Frames menus. */
windows_or_buffers_changed = 17;
bottom edge of FRAME's display. */)
(Lisp_Object frame, Lisp_Object x, Lisp_Object y)
{
-#ifdef HAVE_WINDOW_SYSTEM
- register struct frame *f = decode_live_frame (frame);
-#else
- (void) decode_live_frame (frame);
-#endif
+ struct frame *f = decode_live_frame (frame);
CHECK_TYPE_RANGED_INTEGER (int, x);
CHECK_TYPE_RANGED_INTEGER (int, y);
/* I think this should be done with a hook. */
-#ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (f))
- x_set_offset (f, XINT (x), XINT (y), 1);
+ {
+#ifdef HAVE_WINDOW_SYSTEM
+ x_set_offset (f, XINT (x), XINT (y), 1);
#endif
+ }
return Qt;
}
if (new_width != old_width)
{
- FRAME_LEFT_FRINGE_WIDTH (f) = new_width;
- FRAME_FRINGE_COLS (f) /* Round up. */
+ f->left_fringe_width = new_width;
+ f->fringe_cols /* Round up. */
= (new_width + FRAME_RIGHT_FRINGE_WIDTH (f) + unit - 1) / unit;
if (FRAME_X_WINDOW (f) != 0)
if (new_width != old_width)
{
- FRAME_RIGHT_FRINGE_WIDTH (f) = new_width;
- FRAME_FRINGE_COLS (f) /* Round up. */
+ f->right_fringe_width = new_width;
+ f->fringe_cols /* Round up. */
= (new_width + FRAME_LEFT_FRINGE_WIDTH (f) + unit - 1) / unit;
if (FRAME_X_WINDOW (f) != 0)
x_set_right_divider_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
int old = FRAME_RIGHT_DIVIDER_WIDTH (f);
-
CHECK_TYPE_RANGED_INTEGER (int, arg);
- FRAME_RIGHT_DIVIDER_WIDTH (f) = XINT (arg);
- if (FRAME_RIGHT_DIVIDER_WIDTH (f) < 0)
- FRAME_RIGHT_DIVIDER_WIDTH (f) = 0;
- if (FRAME_RIGHT_DIVIDER_WIDTH (f) != old)
+ int new = max (0, XINT (arg));
+ if (new != old)
{
+ f->right_divider_width = new;
adjust_frame_size (f, -1, -1, 4, 0, Qright_divider_width);
adjust_frame_glyphs (f);
SET_FRAME_GARBAGED (f);
x_set_bottom_divider_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
int old = FRAME_BOTTOM_DIVIDER_WIDTH (f);
-
CHECK_TYPE_RANGED_INTEGER (int, arg);
- FRAME_BOTTOM_DIVIDER_WIDTH (f) = XINT (arg);
- if (FRAME_BOTTOM_DIVIDER_WIDTH (f) < 0)
- FRAME_BOTTOM_DIVIDER_WIDTH (f) = 0;
- if (FRAME_BOTTOM_DIVIDER_WIDTH (f) != old)
+ int new = max (0, XINT (arg));
+ if (new != old)
{
+ f->bottom_divider_width = new;
adjust_frame_size (f, -1, -1, 4, 0, Qbottom_divider_width);
adjust_frame_glyphs (f);
SET_FRAME_GARBAGED (f);
extern int frame_default_tool_bar_height;
#endif
+#ifdef HAVE_WINDOW_SYSTEM
+# define WINDOW_SYSTEM_RETURN
+#else
+# define WINDOW_SYSTEM_RETURN _Noreturn
+#endif
+
+extern WINDOW_SYSTEM_RETURN struct frame *
+ decode_window_system_frame (Lisp_Object);
extern struct frame *decode_live_frame (Lisp_Object);
extern struct frame *decode_any_frame (Lisp_Object);
extern struct frame *make_initial_frame (void);
extern struct frame *make_frame (bool);
#ifdef HAVE_WINDOW_SYSTEM
-extern void check_window_system (struct frame *);
-extern struct frame *decode_window_system_frame (Lisp_Object);
extern struct frame *make_minibuffer_frame (void);
extern struct frame *make_frame_without_minibuffer (Lisp_Object,
struct kboard *,
Lisp_Object);
-extern bool window_system_available (struct frame *);
-#else /* not HAVE_WINDOW_SYSTEM */
-extern _Noreturn void check_window_system (struct frame *);
-extern _Noreturn void decode_window_system_frame (Lisp_Object);
-#define window_system_available(f) ((void) (f), false)
-#endif /* HAVE_WINDOW_SYSTEM */
+extern bool display_available (void);
+#endif
+
+INLINE bool
+window_system_available (struct frame *f)
+{
+#ifdef HAVE_WINDOW_SYSTEM
+ return f ? FRAME_WINDOW_P (f) || FRAME_MSDOS_P (f) : display_available ();
+#else
+ return false;
+#endif
+}
+
+extern WINDOW_SYSTEM_RETURN void check_window_system (struct frame *);
extern void frame_make_pointer_invisible (struct frame *);
extern void frame_make_pointer_visible (struct frame *);
extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object);
This value currently equals the average width of the default font of F. */
#define FRAME_COLUMN_WIDTH(F) ((F)->column_width)
-/* Pixel width of areas used to display truncation marks, continuation
- marks, overlay arrows. This is 0 for terminal frames. */
+/* Get a frame's window system dimension. If no window system, this is 0. */
+INLINE int
+frame_dimension (int x)
+{
#ifdef HAVE_WINDOW_SYSTEM
+ return x;
+#else
+ return 0;
+#endif
+}
/* Total width of fringes reserved for drawing truncation bitmaps,
continuation bitmaps and alike. The width is in canonical char
units of the frame. This must currently be the case because window
sizes aren't pixel values. If it weren't the case, we wouldn't be
able to split windows horizontally nicely. */
-#define FRAME_FRINGE_COLS(F) ((F)->fringe_cols)
+INLINE int
+FRAME_FRINGE_COLS (struct frame *f)
+{
+ return frame_dimension (f->fringe_cols);
+}
/* Pixel-width of the left and right fringe. */
-#define FRAME_LEFT_FRINGE_WIDTH(F) ((F)->left_fringe_width)
-#define FRAME_RIGHT_FRINGE_WIDTH(F) ((F)->right_fringe_width)
+INLINE int
+FRAME_LEFT_FRINGE_WIDTH (struct frame *f)
+{
+ return frame_dimension (f->left_fringe_width);
+}
+INLINE int
+FRAME_RIGHT_FRINGE_WIDTH (struct frame *f)
+{
+ return frame_dimension (f->right_fringe_width);
+}
/* Total width of fringes in pixels. */
-#define FRAME_TOTAL_FRINGE_WIDTH(F) \
- (FRAME_LEFT_FRINGE_WIDTH (F) + FRAME_RIGHT_FRINGE_WIDTH (F))
+INLINE int
+FRAME_TOTAL_FRINGE_WIDTH (struct frame *f)
+{
+ return FRAME_LEFT_FRINGE_WIDTH (f) + FRAME_RIGHT_FRINGE_WIDTH (f);
+}
/* Pixel-width of internal border lines */
-#define FRAME_INTERNAL_BORDER_WIDTH(F) ((F)->internal_border_width)
+INLINE int
+FRAME_INTERNAL_BORDER_WIDTH (struct frame *f)
+{
+ return frame_dimension (f->internal_border_width);
+}
/* Pixel-size of window border lines */
-#define FRAME_RIGHT_DIVIDER_WIDTH(F) ((F)->right_divider_width)
-#define FRAME_BOTTOM_DIVIDER_WIDTH(F) ((F)->bottom_divider_width)
-
-#else /* not HAVE_WINDOW_SYSTEM */
-
-#define FRAME_FRINGE_COLS(F) ((void) (F), 0)
-#define FRAME_TOTAL_FRINGE_WIDTH(F) ((void) (F), 0)
-#define FRAME_LEFT_FRINGE_WIDTH(F) ((void) (F), 0)
-#define FRAME_RIGHT_FRINGE_WIDTH(F) ((void) (F), 0)
-#define FRAME_INTERNAL_BORDER_WIDTH(F) ((void) (F), 0)
-#define FRAME_RIGHT_DIVIDER_WIDTH(F) ((void) (F), 0)
-#define FRAME_BOTTOM_DIVIDER_WIDTH(F) ((void) (F), 0)
-
-#endif /* not HAVE_WINDOW_SYSTEM */
+INLINE int
+FRAME_RIGHT_DIVIDER_WIDTH (struct frame *f)
+{
+ return frame_dimension (f->right_divider_width);
+}
+INLINE int
+FRAME_BOTTOM_DIVIDER_WIDTH (struct frame *f)
+{
+ return frame_dimension (f->bottom_divider_width);
+}
\f
/***********************************************************************
Conversion between canonical units and pixels
message ("gnutls.c: [%d] %s %s", level, string, extra);
}
-/* Log a message and an integer. */
-static void
-gnutls_log_function2i (int level, const char *string, int extra)
-{
- message ("gnutls.c: [%d] %s %d", level, string, extra);
-}
-
int
gnutls_try_handshake (struct Lisp_Process *proc)
{
#define GNUTLS_LOG2i(level, max, string, extra) \
do { \
if ((level) <= (max)) \
- gnutls_log_function2i (level, "(Emacs) " string, extra); \
+ message ("gnutls.c: [%d] %s %d", level, string, extra); \
} while (false)
extern ptrdiff_t
#define PIX_MASK_DRAW 1
#define x_defined_color w32_defined_color
-#if 0 /* unused */
-#define DefaultDepthOfScreen(screen) (one_w32_display_info.n_cbits)
-#endif
#endif /* HAVE_NTGUI */
STR's value is not necessarily copied. The resulting Lisp string
should not be modified or made visible to user code. */
-/* Avoid initializing NAME to prevent "jump-misses-init" compiler
- warnings. */
#define AUTO_STRING_WITH_LEN(name, str, len) \
- Lisp_Object name; name = \
+ Lisp_Object name = \
(USE_STACK_STRING \
? (make_lisp_ptr \
((&(union Aligned_String) \
#ifdef HAVE_MALLOC_H
# include <malloc.h>
#endif
-#ifndef __MALLOC_HOOK_VOLATILE
-# define __MALLOC_HOOK_VOLATILE volatile
-#endif
#ifndef HAVE_MALLOC_H
+# ifndef __MALLOC_HOOK_VOLATILE
+# define __MALLOC_HOOK_VOLATILE volatile
+# endif
extern void *(*__morecore) (ptrdiff_t);
extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void);
#endif
return 1;
#ifdef HAVE_WINDOW_SYSTEM
- int fringe_bitmap;
-
value = XCAR (XCDR (spec));
- if (!SYMBOLP (value)
- || !(fringe_bitmap = lookup_fringe_bitmap (value)))
+ int fringe_bitmap = SYMBOLP (value) ? lookup_fringe_bitmap (value) : 0;
+ if (! fringe_bitmap)
/* If we return here, POSITION has been advanced
across the text with this property. */
{
int pt_x, target_x, pixel_width, pt_vpos;
bool at_eol_p;
bool overshoot_expected = false;
-#ifdef HAVE_WINDOW_SYSTEM
bool target_is_eol_p = false;
-#endif
/* Setup the arena. */
SET_TEXT_POS (pt, PT, PT_BYTE);
{
move_it_by_lines (&it, -1);
target_x = it.last_visible_x - !FRAME_WINDOW_P (it.f);
-#ifdef HAVE_WINDOW_SYSTEM
target_is_eol_p = true;
-#endif
/* Under word-wrap, we don't know the x coordinate of
the last character displayed on the previous line,
which immediately precedes the wrap point. To find
}
/* Move to the target X coordinate. */
-#ifdef HAVE_WINDOW_SYSTEM
/* On GUI frames, as we don't know the X coordinate of the
character to the left of point, moving point to the left
requires walking, one grapheme cluster at a time, until we
new_pos.bytepos = CHAR_TO_BYTE (new_pos.charpos);
it.current.pos = new_pos;
}
- else
-#endif
- if (it.current_x != target_x)
+ else if (it.current_x != target_x)
move_it_in_display_line_to (&it, ZV, target_x, MOVE_TO_POS | MOVE_TO_X);
/* If we ended up in a display string that covers point, move to
show_mouse_face (Mouse_HLInfo *hlinfo, enum draw_glyphs_face draw)
{
struct window *w = XWINDOW (hlinfo->mouse_face_window);
-#ifdef HAVE_WINDOW_SYSTEM
struct frame *f = XFRAME (WINDOW_FRAME (w));
-#else
- (void) XFRAME (WINDOW_FRAME (w));
-#endif
if (/* If window is in the process of being destroyed, don't bother
to do anything. */
anymore. This can happen when a window is split. */
&& hlinfo->mouse_face_end_row < w->current_matrix->nrows)
{
-#ifdef HAVE_WINDOW_SYSTEM
bool phys_cursor_on_p = w->phys_cursor_on_p;
-#endif
struct glyph_row *row, *first, *last;
first = MATRIX_ROW (w->current_matrix, hlinfo->mouse_face_beg_row);
}
}
-#ifdef HAVE_WINDOW_SYSTEM
/* When we've written over the cursor, arrange for it to
be displayed again. */
if (FRAME_WINDOW_P (f)
&& phys_cursor_on_p && !w->phys_cursor_on_p)
{
+#ifdef HAVE_WINDOW_SYSTEM
int hpos = w->phys_cursor.hpos;
/* When the window is hscrolled, cursor hpos can legitimately be
display_and_set_cursor (w, true, hpos, w->phys_cursor.vpos,
w->phys_cursor.x, w->phys_cursor.y);
unblock_input ();
- }
#endif /* HAVE_WINDOW_SYSTEM */
+ }
}
#ifdef HAVE_WINDOW_SYSTEM
clip_to_bounds (INT_MIN, XINT (x), INT_MAX),
clip_to_bounds (INT_MIN, XINT (y), INT_MAX));
}
+#endif /* HAVE_WINDOW_SYSTEM */
/* Display frame CURSOR, optionally using shape defined by POINTER. */
static void
define_frame_cursor1 (struct frame *f, Cursor cursor, Lisp_Object pointer)
{
+#ifdef HAVE_WINDOW_SYSTEM
+ if (!FRAME_WINDOW_P (f))
+ return;
+
/* Do not change cursor shape while dragging mouse. */
if (EQ (do_mouse_tracking, Qdragging))
return;
cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor;
else if (EQ (pointer, intern ("nhdrag")))
cursor = FRAME_X_OUTPUT (f)->vertical_drag_cursor;
-#ifdef HAVE_X_WINDOWS
+# ifdef HAVE_X_WINDOWS
else if (EQ (pointer, intern ("vdrag")))
cursor = FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor;
-#endif
+# endif
else if (EQ (pointer, intern ("hourglass")))
cursor = FRAME_X_OUTPUT (f)->hourglass_cursor;
else if (EQ (pointer, Qmodeline))
if (cursor != No_Cursor)
FRAME_RIF (f)->define_frame_cursor (f, cursor);
+#endif
}
-#endif /* HAVE_WINDOW_SYSTEM */
-
/* Take proper action when mouse has moved to the mode or header line
or marginal area AREA of window W, x-position X and y-position Y.
X is relative to the start of the text display area of W, so the
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
#ifdef HAVE_WINDOW_SYSTEM
Display_Info *dpyinfo;
+#endif
Cursor cursor = No_Cursor;
Lisp_Object pointer = Qnil;
-#endif
int dx, dy, width, height;
ptrdiff_t charpos;
Lisp_Object string, object = Qnil;
&& hlinfo->mouse_face_beg_row == vpos )
return;
-#ifdef HAVE_WINDOW_SYSTEM
if (clear_mouse_face (hlinfo))
cursor = No_Cursor;
-#else
- (void) clear_mouse_face (hlinfo);
-#endif
if (!row->reversed_p)
{
show_mouse_face (hlinfo, DRAW_MOUSE_FACE);
mouse_face_shown = true;
-#ifdef HAVE_WINDOW_SYSTEM
if (NILP (pointer))
pointer = Qhand;
-#endif
}
}
if ((area == ON_MODE_LINE || area == ON_HEADER_LINE) && !mouse_face_shown)
clear_mouse_face (hlinfo);
-#ifdef HAVE_WINDOW_SYSTEM
- if (FRAME_WINDOW_P (f))
- define_frame_cursor1 (f, cursor, pointer);
-#endif
+ define_frame_cursor1 (f, cursor, pointer);
}
enum window_part part = ON_NOTHING;
Lisp_Object window;
struct window *w;
-#ifdef HAVE_WINDOW_SYSTEM
Cursor cursor = No_Cursor;
Lisp_Object pointer = Qnil; /* Takes precedence over cursor! */
-#endif
struct buffer *b;
/* When a menu is active, don't highlight because this looks odd. */
&& glyph->type == STRETCH_GLYPH
&& glyph->avoid_cursor_p))
{
-#ifndef HAVE_WINDOW_SYSTEM
- (void) clear_mouse_face (hlinfo);
-#else /* HAVE_WINDOW_SYSTEM */
if (clear_mouse_face (hlinfo))
cursor = No_Cursor;
if (FRAME_WINDOW_P (f) && NILP (pointer))
{
+#ifdef HAVE_WINDOW_SYSTEM
if (area != TEXT_AREA)
cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
else
pointer = Vvoid_text_area_pointer;
+#endif
}
-#endif /* HAVE_WINDOW_SYSTEM */
goto set_cursor;
}
same_region = coords_in_mouse_face_p (w, hpos, vpos);
-#ifdef HAVE_WINDOW_SYSTEM
if (same_region)
cursor = No_Cursor;
-#endif
/* Check mouse-face highlighting. */
if (! same_region
hlinfo->mouse_face_overlay = overlay;
/* Clear the display of the old active region, if any. */
-#ifdef HAVE_WINDOW_SYSTEM
if (clear_mouse_face (hlinfo))
cursor = No_Cursor;
-#else
- (void) clear_mouse_face (hlinfo);
-#endif
/* If no overlay applies, get a text property. */
if (NILP (overlay))
= face_at_string_position (w, object, pos, 0, &ignore,
glyph->face_id, true);
show_mouse_face (hlinfo, DRAW_MOUSE_FACE);
-#ifdef HAVE_WINDOW_SYSTEM
cursor = No_Cursor;
-#endif
}
else
{
: XFASTINT (after),
before_string, after_string,
disp_string);
-#ifdef HAVE_WINDOW_SYSTEM
cursor = No_Cursor;
-#endif
}
}
}
}
set_cursor:
-
-#ifdef HAVE_WINDOW_SYSTEM
- if (FRAME_WINDOW_P (f))
- define_frame_cursor1 (f, cursor, pointer);
-#else
- /* This is here to prevent a compiler error, about "label at end of
- compound statement". */
- return;
-#endif
+ define_frame_cursor1 (f, cursor, pointer);
}
eassert (lface_fully_specified_p (XVECTOR (lface)->contents));
check_lface (lface);
memcpy (attrs, XVECTOR (lface)->contents, sizeof attrs);
-
-#ifndef HAVE_X_WINDOWS
- (void) realize_face (c, attrs, DEFAULT_FACE_ID);
-#else /* HAVE_X_WINDOWS */
struct face *face = realize_face (c, attrs, DEFAULT_FACE_ID);
+
+#ifndef HAVE_WINDOW_SYSTEM
+ (void) face;
+#else
if (FRAME_X_P (f) && face->font != FRAME_FONT (f))
{
/* This can happen when making a frame on a display that does
font. */
x_set_font (f, LFACE_FONT (lface), Qnil);
}
-#endif /* HAVE_X_WINDOWS */
+#endif
return true;
}
if we don't have fonts, so we can stop here if not working
on a window-system frame. */
|| !FRAME_WINDOW_P (f)
- || FACE_SUITABLE_FOR_ASCII_CHAR_P (base_face, 0)))
+ || FACE_SUITABLE_FOR_ASCII_CHAR_P (base_face)))
return base_face->id;
/* Begin with attributes from the base face. */
if (border != FRAME_INTERNAL_BORDER_WIDTH (f))
{
- FRAME_INTERNAL_BORDER_WIDTH (f) = border;
+ f->internal_border_width = border;
#ifdef USE_X_TOOLKIT
if (FRAME_X_OUTPUT (f)->edit_widget)