From: Eli Zaretskii Date: Fri, 5 Nov 2010 18:07:42 +0000 (+0200) Subject: Fix unified mouse highlight after compiling on Unix. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~45^2~370^2~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8e5ba371f2679f97217842b598191fef43e11856;p=emacs.git Fix unified mouse highlight after compiling on Unix. xdisp.c (x_consider_frame_title, tool_bar_lines_needed): Move prototypes to HAVE_WINDOW_SYSTEM-only part. frame.h (MOUSE_HL_INFO): Fix definition to work both for TTY-only and GUI builds. --- diff --git a/src/ChangeLog b/src/ChangeLog index e840b18460e..361e3dd9876 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2010-11-05 Eli Zaretskii + * xdisp.c (x_consider_frame_title, tool_bar_lines_needed): Move + prototypes to HAVE_WINDOW_SYSTEM-only part. + + * frame.h (MOUSE_HL_INFO): Fix definition to work both for + TTY-only and GUI builds. + * dispnew.c (init_display): Setup initial frame's output_data for text terminal frames. diff --git a/src/frame.h b/src/frame.h index 72c0f6be2d7..31f601737c8 100644 --- a/src/frame.h +++ b/src/frame.h @@ -546,11 +546,17 @@ typedef struct frame *FRAME_PTR; /* Return a pointer to the structure holding information about the region of text, if any, that is currently shown in mouse-face on - frame F. */ -#define MOUSE_HL_INFO(F) \ - (FRAME_WINDOW_P(F) \ - ? &(FRAME_X_DISPLAY_INFO(F)->mouse_highlight) \ - : &(((F)->output_data.tty->display_info)->mouse_highlight)) + frame F. We need to define two versions because a TTY-only build + does not have FRAME_X_DISPLAY_INFO. */ +#ifdef HAVE_WINDOW_SYSTEM +# define MOUSE_HL_INFO(F) \ + (FRAME_WINDOW_P(F) \ + ? &(FRAME_X_DISPLAY_INFO(F)->mouse_highlight) \ + : &(((F)->output_data.tty->display_info)->mouse_highlight)) +#else +# define MOUSE_HL_INFO(F) \ + (&(((F)->output_data.tty->display_info)->mouse_highlight)) +#endif /* Nonzero if frame F is still alive (not deleted). */ #define FRAME_LIVE_P(f) ((f)->terminal != 0) diff --git a/src/xdisp.c b/src/xdisp.c index 275f762caa8..732df80a2ac 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -960,10 +960,8 @@ static int text_outside_line_unchanged_p (struct window *, EMACS_INT, EMACS_INT); static void store_mode_line_noprop_char (char); static int store_mode_line_noprop (const unsigned char *, int, int); -static void x_consider_frame_title (Lisp_Object); static void handle_stop (struct it *); static void handle_stop_backwards (struct it *, EMACS_INT); -static int tool_bar_lines_needed (struct frame *, int *); static int single_display_spec_intangible_p (Lisp_Object); static void ensure_echo_area_buffers (void); static Lisp_Object unwind_with_echo_area_buffer (Lisp_Object); @@ -1076,6 +1074,8 @@ static int in_ellipses_for_invisible_text_p (struct display_pos *, #ifdef HAVE_WINDOW_SYSTEM +static void x_consider_frame_title (Lisp_Object); +static int tool_bar_lines_needed (struct frame *, int *); static void update_tool_bar (struct frame *, int); static void build_desired_tool_bar_string (struct frame *f); static int redisplay_tool_bar (struct frame *);