aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKen Brown2016-06-20 17:54:23 -0400
committerKen Brown2016-06-20 21:53:49 -0400
commitd4c1535c6321318e3ba96a482303bfc790a47266 (patch)
tree5daf1c1c2c02aad33faeec63a6feae52dd0cc776 /src
parent9eaec6859df69f0baac57f0801bfbf195ee88dc5 (diff)
downloademacs-d4c1535c6321318e3ba96a482303bfc790a47266.tar.gz
emacs-d4c1535c6321318e3ba96a482303bfc790a47266.zip
Fix compiler warnings in no-window-system-build
* src/composite.c (autocmp_chars): Declare and set 'f' only if HAVE_WINDOW_SYSTEM. * src/dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P) (FACE_FOR_CHAR): Explicitly discard unused arguments. * src/font.c (font_open_entity): Declare 'min_width' where it is first set, and only if HAVE_WINDOW_SYSTEM. * src/frame.c [!HAVE_WINDOW_SYSTEM] (decode_window_system_frame): Define _Noreturn version to avoid "suggest attribute noreturn" compiler warning. (check_window_system): Declare as _Noreturn. (Ficonify_frame): (Fset_frame_position): Don’t declare and set 'f'. * src/frame.h [!HAVE_WINDOW_SYSTEM] (decode_window_system_frame) (check_window_system): Add _Noreturn prototypes. (FRAME_FRINGE_COLS, FRAME_TOTAL_FRINGE_WIDTH) (FRAME_LEFT_FRINGE_WIDTH, FRAME_RIGHT_FRINGE_WIDTH) (FRAME_INTERNAL_BORDER_WIDTH, FRAME_RIGHT_DIVIDER_WIDTH) (FRAME_BOTTOM_DIVIDER_WIDTH): Explicitly discard unused argument. * src/xdisp.c (handle_single_display_spec): Declare 'fringe_bitmap' only if HAVE_WINDOW_SYSTEM. (append_space_for_newline): Declare 'g' where it is first set. (Fmove_point_visually): Declare and set 'target_is_eol_p' only if HAVE_WINDOW_SYSTEM. (show_mouse_face): Declare and set 'f' and 'phys_cursor_on_p' only if HAVE_WINDOW_SYSTEM. (note_mode_line_or_margin_highlight): (note_mouse_highlight): Declare and set 'cursor' and 'pointer' only if HAVE_WINDOW_SYSTEM. * src/xfaces.c (realize_default_face): Declare and set 'face' only if HAVE_X_WINDOWS. Remove redundant #ifdef.
Diffstat (limited to 'src')
-rw-r--r--src/composite.c4
-rw-r--r--src/dispextern.h7
-rw-r--r--src/font.c12
-rw-r--r--src/frame.c20
-rw-r--r--src/frame.h20
-rw-r--r--src/xdisp.c43
-rw-r--r--src/xfaces.c9
7 files changed, 85 insertions, 30 deletions
diff --git a/src/composite.c b/src/composite.c
index bef1c5f7c3b..5696e3ee3a9 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -867,7 +867,11 @@ autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos,
867 Lisp_Object string) 867 Lisp_Object string)
868{ 868{
869 ptrdiff_t count = SPECPDL_INDEX (); 869 ptrdiff_t count = SPECPDL_INDEX ();
870#ifdef HAVE_WINDOW_SYSTEM
870 struct frame *f = XFRAME (win->frame); 871 struct frame *f = XFRAME (win->frame);
872#else
873 (void) XFRAME (win->frame);
874#endif
871 Lisp_Object pos = make_number (charpos); 875 Lisp_Object pos = make_number (charpos);
872 ptrdiff_t to; 876 ptrdiff_t to;
873 ptrdiff_t pt = PT, pt_byte = PT_BYTE; 877 ptrdiff_t pt = PT, pt_byte = PT_BYTE;
diff --git a/src/dispextern.h b/src/dispextern.h
index e83b7c7fc83..987d7f8b048 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1843,8 +1843,11 @@ struct face_cache
1843 1843
1844#else /* not HAVE_WINDOW_SYSTEM */ 1844#else /* not HAVE_WINDOW_SYSTEM */
1845 1845
1846#define FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE, CHAR) true 1846#define FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE, CHAR) \
1847#define FACE_FOR_CHAR(F, FACE, CHAR, POS, OBJECT) ((FACE)->id) 1847 ((void) (FACE), (void) (CHAR), true)
1848#define FACE_FOR_CHAR(F, FACE, CHAR, POS, OBJECT) \
1849 ((void) (F), (void) (FACE), (void) (CHAR), (void) (POS), \
1850 (void) (OBJECT), (FACE)->id)
1848 1851
1849#endif /* not HAVE_WINDOW_SYSTEM */ 1852#endif /* not HAVE_WINDOW_SYSTEM */
1850 1853
diff --git a/src/font.c b/src/font.c
index f289891bf65..144ba07c42a 100644
--- a/src/font.c
+++ b/src/font.c
@@ -2863,7 +2863,7 @@ font_open_entity (struct frame *f, Lisp_Object entity, int pixel_size)
2863 struct font_driver_list *driver_list; 2863 struct font_driver_list *driver_list;
2864 Lisp_Object objlist, size, val, font_object; 2864 Lisp_Object objlist, size, val, font_object;
2865 struct font *font; 2865 struct font *font;
2866 int min_width, height, psize; 2866 int height, psize;
2867 2867
2868 eassert (FONT_ENTITY_P (entity)); 2868 eassert (FONT_ENTITY_P (entity));
2869 size = AREF (entity, FONT_SIZE_INDEX); 2869 size = AREF (entity, FONT_SIZE_INDEX);
@@ -2907,10 +2907,12 @@ font_open_entity (struct frame *f, Lisp_Object entity, int pixel_size)
2907 Fcons (font_object, AREF (entity, FONT_OBJLIST_INDEX))); 2907 Fcons (font_object, AREF (entity, FONT_OBJLIST_INDEX)));
2908 2908
2909 font = XFONT_OBJECT (font_object); 2909 font = XFONT_OBJECT (font_object);
2910 min_width = (font->min_width ? font->min_width 2910#ifdef HAVE_WINDOW_SYSTEM
2911 : font->average_width ? font->average_width 2911 int min_width = (font->min_width ? font->min_width
2912 : font->space_width ? font->space_width 2912 : font->average_width ? font->average_width
2913 : 1); 2913 : font->space_width ? font->space_width
2914 : 1);
2915#endif
2914 2916
2915 int font_ascent, font_descent; 2917 int font_ascent, font_descent;
2916 get_font_ascent_descent (font, &font_ascent, &font_descent); 2918 get_font_ascent_descent (font, &font_ascent, &font_descent);
diff --git a/src/frame.c b/src/frame.c
index df9753905b2..9048452381c 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -113,8 +113,6 @@ window_system_available (struct frame *f)
113 return f ? FRAME_WINDOW_P (f) || FRAME_MSDOS_P (f) : x_display_list != NULL; 113 return f ? FRAME_WINDOW_P (f) || FRAME_MSDOS_P (f) : x_display_list != NULL;
114} 114}
115 115
116#endif /* HAVE_WINDOW_SYSTEM */
117
118struct frame * 116struct frame *
119decode_window_system_frame (Lisp_Object frame) 117decode_window_system_frame (Lisp_Object frame)
120{ 118{
@@ -125,6 +123,16 @@ decode_window_system_frame (Lisp_Object frame)
125 return f; 123 return f;
126} 124}
127 125
126#else /* not HAVE_WINDOW_SYSTEM */
127
128_Noreturn void
129decode_window_system_frame (Lisp_Object frame)
130{
131 error ("Window system is not in use");
132}
133
134_Noreturn
135#endif /* not HAVE_WINDOW_SYSTEM */
128void 136void
129check_window_system (struct frame *f) 137check_window_system (struct frame *f)
130{ 138{
@@ -2129,7 +2137,11 @@ DEFUN ("iconify-frame", Ficonify_frame, Siconify_frame,
2129If omitted, FRAME defaults to the currently selected frame. */) 2137If omitted, FRAME defaults to the currently selected frame. */)
2130 (Lisp_Object frame) 2138 (Lisp_Object frame)
2131{ 2139{
2140#ifdef HAVE_WINDOW_SYSTEM
2132 struct frame *f = decode_live_frame (frame); 2141 struct frame *f = decode_live_frame (frame);
2142#else
2143 (void) decode_live_frame (frame);
2144#endif
2133 2145
2134 /* Don't allow minibuf_window to remain on an iconified frame. */ 2146 /* Don't allow minibuf_window to remain on an iconified frame. */
2135 check_minibuf_window (frame, EQ (minibuf_window, selected_window)); 2147 check_minibuf_window (frame, EQ (minibuf_window, selected_window));
@@ -3001,7 +3013,11 @@ or bottom edge of the outer frame of FRAME relative to the right or
3001bottom edge of FRAME's display. */) 3013bottom edge of FRAME's display. */)
3002 (Lisp_Object frame, Lisp_Object x, Lisp_Object y) 3014 (Lisp_Object frame, Lisp_Object x, Lisp_Object y)
3003{ 3015{
3016#ifdef HAVE_WINDOW_SYSTEM
3004 register struct frame *f = decode_live_frame (frame); 3017 register struct frame *f = decode_live_frame (frame);
3018#else
3019 (void) decode_live_frame (frame);
3020#endif
3005 3021
3006 CHECK_TYPE_RANGED_INTEGER (int, x); 3022 CHECK_TYPE_RANGED_INTEGER (int, x);
3007 CHECK_TYPE_RANGED_INTEGER (int, y); 3023 CHECK_TYPE_RANGED_INTEGER (int, y);
diff --git a/src/frame.h b/src/frame.h
index 7d64e00b422..4ee0a7411f9 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1102,21 +1102,23 @@ extern Lisp_Object selected_frame;
1102extern int frame_default_tool_bar_height; 1102extern int frame_default_tool_bar_height;
1103#endif 1103#endif
1104 1104
1105extern struct frame *decode_window_system_frame (Lisp_Object);
1106extern struct frame *decode_live_frame (Lisp_Object); 1105extern struct frame *decode_live_frame (Lisp_Object);
1107extern struct frame *decode_any_frame (Lisp_Object); 1106extern struct frame *decode_any_frame (Lisp_Object);
1108extern struct frame *make_initial_frame (void); 1107extern struct frame *make_initial_frame (void);
1109extern struct frame *make_frame (bool); 1108extern struct frame *make_frame (bool);
1110#ifdef HAVE_WINDOW_SYSTEM 1109#ifdef HAVE_WINDOW_SYSTEM
1110extern void check_window_system (struct frame *);
1111extern struct frame *decode_window_system_frame (Lisp_Object);
1111extern struct frame *make_minibuffer_frame (void); 1112extern struct frame *make_minibuffer_frame (void);
1112extern struct frame *make_frame_without_minibuffer (Lisp_Object, 1113extern struct frame *make_frame_without_minibuffer (Lisp_Object,
1113 struct kboard *, 1114 struct kboard *,
1114 Lisp_Object); 1115 Lisp_Object);
1115extern bool window_system_available (struct frame *); 1116extern bool window_system_available (struct frame *);
1116#else /* not HAVE_WINDOW_SYSTEM */ 1117#else /* not HAVE_WINDOW_SYSTEM */
1118extern _Noreturn void check_window_system (struct frame *);
1119extern _Noreturn void decode_window_system_frame (Lisp_Object);
1117#define window_system_available(f) ((void) (f), false) 1120#define window_system_available(f) ((void) (f), false)
1118#endif /* HAVE_WINDOW_SYSTEM */ 1121#endif /* HAVE_WINDOW_SYSTEM */
1119extern void check_window_system (struct frame *);
1120extern void frame_make_pointer_invisible (struct frame *); 1122extern void frame_make_pointer_invisible (struct frame *);
1121extern void frame_make_pointer_visible (struct frame *); 1123extern void frame_make_pointer_visible (struct frame *);
1122extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object); 1124extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object);
@@ -1181,13 +1183,13 @@ extern Lisp_Object Vframe_list;
1181 1183
1182#else /* not HAVE_WINDOW_SYSTEM */ 1184#else /* not HAVE_WINDOW_SYSTEM */
1183 1185
1184#define FRAME_FRINGE_COLS(F) 0 1186#define FRAME_FRINGE_COLS(F) ((void) (F), 0)
1185#define FRAME_TOTAL_FRINGE_WIDTH(F) 0 1187#define FRAME_TOTAL_FRINGE_WIDTH(F) ((void) (F), 0)
1186#define FRAME_LEFT_FRINGE_WIDTH(F) 0 1188#define FRAME_LEFT_FRINGE_WIDTH(F) ((void) (F), 0)
1187#define FRAME_RIGHT_FRINGE_WIDTH(F) 0 1189#define FRAME_RIGHT_FRINGE_WIDTH(F) ((void) (F), 0)
1188#define FRAME_INTERNAL_BORDER_WIDTH(F) 0 1190#define FRAME_INTERNAL_BORDER_WIDTH(F) ((void) (F), 0)
1189#define FRAME_RIGHT_DIVIDER_WIDTH(F) 0 1191#define FRAME_RIGHT_DIVIDER_WIDTH(F) ((void) (F), 0)
1190#define FRAME_BOTTOM_DIVIDER_WIDTH(F) 0 1192#define FRAME_BOTTOM_DIVIDER_WIDTH(F) ((void) (F), 0)
1191 1193
1192#endif /* not HAVE_WINDOW_SYSTEM */ 1194#endif /* not HAVE_WINDOW_SYSTEM */
1193 1195
diff --git a/src/xdisp.c b/src/xdisp.c
index d589080ac4c..bcb283f8faa 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -5017,8 +5017,6 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
5017 || EQ (XCAR (spec), Qright_fringe)) 5017 || EQ (XCAR (spec), Qright_fringe))
5018 && CONSP (XCDR (spec))) 5018 && CONSP (XCDR (spec)))
5019 { 5019 {
5020 int fringe_bitmap;
5021
5022 if (it) 5020 if (it)
5023 { 5021 {
5024 if (!FRAME_WINDOW_P (it->f)) 5022 if (!FRAME_WINDOW_P (it->f))
@@ -5042,6 +5040,8 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
5042 return 1; 5040 return 1;
5043 5041
5044#ifdef HAVE_WINDOW_SYSTEM 5042#ifdef HAVE_WINDOW_SYSTEM
5043 int fringe_bitmap;
5044
5045 value = XCAR (XCDR (spec)); 5045 value = XCAR (XCDR (spec));
5046 if (!SYMBOLP (value) 5046 if (!SYMBOLP (value)
5047 || !(fringe_bitmap = lookup_fringe_bitmap (value))) 5047 || !(fringe_bitmap = lookup_fringe_bitmap (value)))
@@ -19509,7 +19509,6 @@ append_space_for_newline (struct it *it, bool default_face_p)
19509 struct text_pos saved_pos; 19509 struct text_pos saved_pos;
19510 Lisp_Object saved_object; 19510 Lisp_Object saved_object;
19511 struct face *face; 19511 struct face *face;
19512 struct glyph *g;
19513 19512
19514 saved_object = it->object; 19513 saved_object = it->object;
19515 saved_pos = it->position; 19514 saved_pos = it->position;
@@ -19545,7 +19544,7 @@ append_space_for_newline (struct it *it, bool default_face_p)
19545 /* Make sure this space glyph has the right ascent and 19544 /* Make sure this space glyph has the right ascent and
19546 descent values, or else cursor at end of line will look 19545 descent values, or else cursor at end of line will look
19547 funny, and height of empty lines will be incorrect. */ 19546 funny, and height of empty lines will be incorrect. */
19548 g = it->glyph_row->glyphs[TEXT_AREA] + n; 19547 struct glyph *g = it->glyph_row->glyphs[TEXT_AREA] + n;
19549 struct font *font = face->font ? face->font : FRAME_FONT (it->f); 19548 struct font *font = face->font ? face->font : FRAME_FONT (it->f);
19550 if (n == 0) 19549 if (n == 0)
19551 { 19550 {
@@ -21687,7 +21686,9 @@ Value is the new character position of point. */)
21687 int pt_x, target_x, pixel_width, pt_vpos; 21686 int pt_x, target_x, pixel_width, pt_vpos;
21688 bool at_eol_p; 21687 bool at_eol_p;
21689 bool overshoot_expected = false; 21688 bool overshoot_expected = false;
21689#ifdef HAVE_WINDOW_SYSTEM
21690 bool target_is_eol_p = false; 21690 bool target_is_eol_p = false;
21691#endif
21691 21692
21692 /* Setup the arena. */ 21693 /* Setup the arena. */
21693 SET_TEXT_POS (pt, PT, PT_BYTE); 21694 SET_TEXT_POS (pt, PT, PT_BYTE);
@@ -21802,7 +21803,9 @@ Value is the new character position of point. */)
21802 { 21803 {
21803 move_it_by_lines (&it, -1); 21804 move_it_by_lines (&it, -1);
21804 target_x = it.last_visible_x - !FRAME_WINDOW_P (it.f); 21805 target_x = it.last_visible_x - !FRAME_WINDOW_P (it.f);
21806#ifdef HAVE_WINDOW_SYSTEM
21805 target_is_eol_p = true; 21807 target_is_eol_p = true;
21808#endif
21806 /* Under word-wrap, we don't know the x coordinate of 21809 /* Under word-wrap, we don't know the x coordinate of
21807 the last character displayed on the previous line, 21810 the last character displayed on the previous line,
21808 which immediately precedes the wrap point. To find 21811 which immediately precedes the wrap point. To find
@@ -28594,7 +28597,11 @@ static void
28594show_mouse_face (Mouse_HLInfo *hlinfo, enum draw_glyphs_face draw) 28597show_mouse_face (Mouse_HLInfo *hlinfo, enum draw_glyphs_face draw)
28595{ 28598{
28596 struct window *w = XWINDOW (hlinfo->mouse_face_window); 28599 struct window *w = XWINDOW (hlinfo->mouse_face_window);
28600#ifdef HAVE_WINDOW_SYSTEM
28597 struct frame *f = XFRAME (WINDOW_FRAME (w)); 28601 struct frame *f = XFRAME (WINDOW_FRAME (w));
28602#else
28603 (void) XFRAME (WINDOW_FRAME (w));
28604#endif
28598 28605
28599 if (/* If window is in the process of being destroyed, don't bother 28606 if (/* If window is in the process of being destroyed, don't bother
28600 to do anything. */ 28607 to do anything. */
@@ -28605,7 +28612,9 @@ show_mouse_face (Mouse_HLInfo *hlinfo, enum draw_glyphs_face draw)
28605 anymore. This can happen when a window is split. */ 28612 anymore. This can happen when a window is split. */
28606 && hlinfo->mouse_face_end_row < w->current_matrix->nrows) 28613 && hlinfo->mouse_face_end_row < w->current_matrix->nrows)
28607 { 28614 {
28615#ifdef HAVE_WINDOW_SYSTEM
28608 bool phys_cursor_on_p = w->phys_cursor_on_p; 28616 bool phys_cursor_on_p = w->phys_cursor_on_p;
28617#endif
28609 struct glyph_row *row, *first, *last; 28618 struct glyph_row *row, *first, *last;
28610 28619
28611 first = MATRIX_ROW (w->current_matrix, hlinfo->mouse_face_beg_row); 28620 first = MATRIX_ROW (w->current_matrix, hlinfo->mouse_face_beg_row);
@@ -29697,9 +29706,9 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y,
29697 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); 29706 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
29698#ifdef HAVE_WINDOW_SYSTEM 29707#ifdef HAVE_WINDOW_SYSTEM
29699 Display_Info *dpyinfo; 29708 Display_Info *dpyinfo;
29700#endif
29701 Cursor cursor = No_Cursor; 29709 Cursor cursor = No_Cursor;
29702 Lisp_Object pointer = Qnil; 29710 Lisp_Object pointer = Qnil;
29711#endif
29703 int dx, dy, width, height; 29712 int dx, dy, width, height;
29704 ptrdiff_t charpos; 29713 ptrdiff_t charpos;
29705 Lisp_Object string, object = Qnil; 29714 Lisp_Object string, object = Qnil;
@@ -29950,8 +29959,12 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y,
29950 && hlinfo->mouse_face_beg_row == vpos ) 29959 && hlinfo->mouse_face_beg_row == vpos )
29951 return; 29960 return;
29952 29961
29962#ifdef HAVE_WINDOW_SYSTEM
29953 if (clear_mouse_face (hlinfo)) 29963 if (clear_mouse_face (hlinfo))
29954 cursor = No_Cursor; 29964 cursor = No_Cursor;
29965#else
29966 (void) clear_mouse_face (hlinfo);
29967#endif
29955 29968
29956 if (!row->reversed_p) 29969 if (!row->reversed_p)
29957 { 29970 {
@@ -29985,8 +29998,10 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y,
29985 show_mouse_face (hlinfo, DRAW_MOUSE_FACE); 29998 show_mouse_face (hlinfo, DRAW_MOUSE_FACE);
29986 mouse_face_shown = true; 29999 mouse_face_shown = true;
29987 30000
30001#ifdef HAVE_WINDOW_SYSTEM
29988 if (NILP (pointer)) 30002 if (NILP (pointer))
29989 pointer = Qhand; 30003 pointer = Qhand;
30004#endif
29990 } 30005 }
29991 } 30006 }
29992 30007
@@ -30017,8 +30032,10 @@ note_mouse_highlight (struct frame *f, int x, int y)
30017 enum window_part part = ON_NOTHING; 30032 enum window_part part = ON_NOTHING;
30018 Lisp_Object window; 30033 Lisp_Object window;
30019 struct window *w; 30034 struct window *w;
30035#ifdef HAVE_WINDOW_SYSTEM
30020 Cursor cursor = No_Cursor; 30036 Cursor cursor = No_Cursor;
30021 Lisp_Object pointer = Qnil; /* Takes precedence over cursor! */ 30037 Lisp_Object pointer = Qnil; /* Takes precedence over cursor! */
30038#endif
30022 struct buffer *b; 30039 struct buffer *b;
30023 30040
30024 /* When a menu is active, don't highlight because this looks odd. */ 30041 /* When a menu is active, don't highlight because this looks odd. */
@@ -30201,9 +30218,11 @@ note_mouse_highlight (struct frame *f, int x, int y)
30201 && glyph->type == STRETCH_GLYPH 30218 && glyph->type == STRETCH_GLYPH
30202 && glyph->avoid_cursor_p)) 30219 && glyph->avoid_cursor_p))
30203 { 30220 {
30221#ifndef HAVE_WINDOW_SYSTEM
30222 (void) clear_mouse_face (hlinfo);
30223#else /* HAVE_WINDOW_SYSTEM */
30204 if (clear_mouse_face (hlinfo)) 30224 if (clear_mouse_face (hlinfo))
30205 cursor = No_Cursor; 30225 cursor = No_Cursor;
30206#ifdef HAVE_WINDOW_SYSTEM
30207 if (FRAME_WINDOW_P (f) && NILP (pointer)) 30226 if (FRAME_WINDOW_P (f) && NILP (pointer))
30208 { 30227 {
30209 if (area != TEXT_AREA) 30228 if (area != TEXT_AREA)
@@ -30211,7 +30230,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
30211 else 30230 else
30212 pointer = Vvoid_text_area_pointer; 30231 pointer = Vvoid_text_area_pointer;
30213 } 30232 }
30214#endif 30233#endif /* HAVE_WINDOW_SYSTEM */
30215 goto set_cursor; 30234 goto set_cursor;
30216 } 30235 }
30217 30236
@@ -30256,8 +30275,10 @@ note_mouse_highlight (struct frame *f, int x, int y)
30256 30275
30257 same_region = coords_in_mouse_face_p (w, hpos, vpos); 30276 same_region = coords_in_mouse_face_p (w, hpos, vpos);
30258 30277
30278#ifdef HAVE_WINDOW_SYSTEM
30259 if (same_region) 30279 if (same_region)
30260 cursor = No_Cursor; 30280 cursor = No_Cursor;
30281#endif
30261 30282
30262 /* Check mouse-face highlighting. */ 30283 /* Check mouse-face highlighting. */
30263 if (! same_region 30284 if (! same_region
@@ -30284,8 +30305,12 @@ note_mouse_highlight (struct frame *f, int x, int y)
30284 hlinfo->mouse_face_overlay = overlay; 30305 hlinfo->mouse_face_overlay = overlay;
30285 30306
30286 /* Clear the display of the old active region, if any. */ 30307 /* Clear the display of the old active region, if any. */
30308#ifdef HAVE_WINDOW_SYSTEM
30287 if (clear_mouse_face (hlinfo)) 30309 if (clear_mouse_face (hlinfo))
30288 cursor = No_Cursor; 30310 cursor = No_Cursor;
30311#else
30312 (void) clear_mouse_face (hlinfo);
30313#endif
30289 30314
30290 /* If no overlay applies, get a text property. */ 30315 /* If no overlay applies, get a text property. */
30291 if (NILP (overlay)) 30316 if (NILP (overlay))
@@ -30316,7 +30341,9 @@ note_mouse_highlight (struct frame *f, int x, int y)
30316 = face_at_string_position (w, object, pos, 0, &ignore, 30341 = face_at_string_position (w, object, pos, 0, &ignore,
30317 glyph->face_id, true); 30342 glyph->face_id, true);
30318 show_mouse_face (hlinfo, DRAW_MOUSE_FACE); 30343 show_mouse_face (hlinfo, DRAW_MOUSE_FACE);
30344#ifdef HAVE_WINDOW_SYSTEM
30319 cursor = No_Cursor; 30345 cursor = No_Cursor;
30346#endif
30320 } 30347 }
30321 else 30348 else
30322 { 30349 {
@@ -30400,7 +30427,9 @@ note_mouse_highlight (struct frame *f, int x, int y)
30400 : XFASTINT (after), 30427 : XFASTINT (after),
30401 before_string, after_string, 30428 before_string, after_string,
30402 disp_string); 30429 disp_string);
30430#ifdef HAVE_WINDOW_SYSTEM
30403 cursor = No_Cursor; 30431 cursor = No_Cursor;
30432#endif
30404 } 30433 }
30405 } 30434 }
30406 } 30435 }
diff --git a/src/xfaces.c b/src/xfaces.c
index ea02ee7ccbe..faf28fc513d 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -5198,7 +5198,6 @@ realize_default_face (struct frame *f)
5198 struct face_cache *c = FRAME_FACE_CACHE (f); 5198 struct face_cache *c = FRAME_FACE_CACHE (f);
5199 Lisp_Object lface; 5199 Lisp_Object lface;
5200 Lisp_Object attrs[LFACE_VECTOR_SIZE]; 5200 Lisp_Object attrs[LFACE_VECTOR_SIZE];
5201 struct face *face;
5202 5201
5203 /* If the `default' face is not yet known, create it. */ 5202 /* If the `default' face is not yet known, create it. */
5204 lface = lface_from_face_name (f, Qdefault, false); 5203 lface = lface_from_face_name (f, Qdefault, false);
@@ -5288,10 +5287,11 @@ realize_default_face (struct frame *f)
5288 eassert (lface_fully_specified_p (XVECTOR (lface)->contents)); 5287 eassert (lface_fully_specified_p (XVECTOR (lface)->contents));
5289 check_lface (lface); 5288 check_lface (lface);
5290 memcpy (attrs, XVECTOR (lface)->contents, sizeof attrs); 5289 memcpy (attrs, XVECTOR (lface)->contents, sizeof attrs);
5291 face = realize_face (c, attrs, DEFAULT_FACE_ID);
5292 5290
5293#ifdef HAVE_WINDOW_SYSTEM 5291#ifndef HAVE_X_WINDOWS
5294#ifdef HAVE_X_WINDOWS 5292 (void) realize_face (c, attrs, DEFAULT_FACE_ID);
5293#else /* HAVE_X_WINDOWS */
5294 struct face *face = realize_face (c, attrs, DEFAULT_FACE_ID);
5295 if (FRAME_X_P (f) && face->font != FRAME_FONT (f)) 5295 if (FRAME_X_P (f) && face->font != FRAME_FONT (f))
5296 { 5296 {
5297 /* This can happen when making a frame on a display that does 5297 /* This can happen when making a frame on a display that does
@@ -5306,7 +5306,6 @@ realize_default_face (struct frame *f)
5306 x_set_font (f, LFACE_FONT (lface), Qnil); 5306 x_set_font (f, LFACE_FONT (lface), Qnil);
5307 } 5307 }
5308#endif /* HAVE_X_WINDOWS */ 5308#endif /* HAVE_X_WINDOWS */
5309#endif /* HAVE_WINDOW_SYSTEM */
5310 return true; 5309 return true;
5311} 5310}
5312 5311