# HG changeset patch # User Karoly Lorentey # Date 1097765923 0 # Node ID fe1db7935e1a6b91a4b45b8f926514d7d92d8e8f # Parent e86fc76a45e4587fa26ff742e325bfecafaa5ad5 Fix core dump in redisplay window. (Reported by Yoshiaki Kasahara.) Plus cleanups. * src/xdisp.c (handle_single_display_prop): Use FRAME_WINDOW_P instead of checking against specific frame types. Ignore images on non-window frames. (echo_area_display): Use FRAME_INITIAL_P to check for initial frame. (redisplay_preserve_echo_area): Update for multi-tty support. (redisplay_window): Don't bother with toolbars, fringe bitmaps or vertical borders on tty frames. (display_line): Remove superflous #ifdefs. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-260 diff -r e86fc76a45e4 -r fe1db7935e1a README.multi-tty --- a/README.multi-tty Thu Oct 14 14:42:03 2004 +0000 +++ b/README.multi-tty Thu Oct 14 14:58:43 2004 +0000 @@ -310,6 +310,9 @@ THINGS TO DO ------------ +** rif->flush_display_optional (NULL) calls should be replaced by a + new global function. + ** Hunt down display-related functions in frame.el and extend them all to accept display ids. diff -r e86fc76a45e4 -r fe1db7935e1a src/xdisp.c --- a/src/xdisp.c Thu Oct 14 14:42:03 2004 +0000 +++ b/src/xdisp.c Thu Oct 14 14:58:43 2004 +0000 @@ -3529,7 +3529,7 @@ && CONSP (XCDR (prop))) { /* `(raise FACTOR)'. */ - if (FRAME_TERMCAP_P (it->f) || FRAME_MSDOS_P (it->f)) + if (!FRAME_WINDOW_P (it->f)) return 0; #ifdef HAVE_WINDOW_SYSTEM @@ -3572,7 +3572,7 @@ when we are finished with the glyph property value. */ /* `(left-fringe BITMAP FACE)'. */ - if (FRAME_TERMCAP_P (it->f) || FRAME_MSDOS_P (it->f)) + if (!FRAME_WINDOW_P (it->f)) return 0; #ifdef HAVE_WINDOW_SYSTEM @@ -3646,7 +3646,7 @@ valid_p = (STRINGP (value) #ifdef HAVE_WINDOW_SYSTEM - || (!FRAME_TERMCAP_P (it->f) && valid_image_p (value)) + || (FRAME_WINDOW_P (it->f) && valid_image_p (value)) #endif /* not HAVE_WINDOW_SYSTEM */ || (CONSP (value) && EQ (XCAR (value), Qspace))); @@ -3693,11 +3693,14 @@ #ifdef HAVE_WINDOW_SYSTEM else { - it->what = IT_IMAGE; - it->image_id = lookup_image (it->f, value); - it->position = start_pos; - it->object = NILP (object) ? it->w->buffer : object; - it->method = next_element_from_image; + if (FRAME_WINDOW_P (it->f)) + { + it->what = IT_IMAGE; + it->image_id = lookup_image (it->f, value); + it->position = start_pos; + it->object = NILP (object) ? it->w->buffer : object; + it->method = next_element_from_image; + } /* Say that we haven't consumed the characters with `display' property yet. The call to pop_it in @@ -7828,8 +7831,7 @@ /* When Emacs starts, selected_frame may be the initial terminal frame. If we let this through, a message would be displayed on the terminal. */ - if (FRAME_TERMCAP_P (XFRAME (selected_frame)) - && FRAME_TTY (XFRAME (selected_frame))->type == NULL) + if (FRAME_INITIAL_P (XFRAME (selected_frame))) return 0; #endif /* HAVE_WINDOW_SYSTEM */ #endif @@ -10404,8 +10406,9 @@ else redisplay_internal (1); - if (rif != NULL && rif->flush_display_optional) - rif->flush_display_optional (NULL); + if (FRAME_RIF (SELECTED_FRAME ()) != NULL + && FRAME_RIF (SELECTED_FRAME ())->flush_display_optional) + FRAME_RIF (SELECTED_FRAME ())->flush_display_optional (NULL); } @@ -12200,22 +12203,25 @@ display_menu_bar (w); #ifdef HAVE_WINDOW_SYSTEM + if (FRAME_WINDOW_P (f)) + { #ifdef USE_GTK - redisplay_tool_bar_p = FRAME_EXTERNAL_TOOL_BAR (f); + redisplay_tool_bar_p = FRAME_EXTERNAL_TOOL_BAR (f); #else - redisplay_tool_bar_p = WINDOWP (f->tool_bar_window) - && (FRAME_TOOL_BAR_LINES (f) > 0 - || auto_resize_tool_bars_p); - -#endif - - if (redisplay_tool_bar_p) - redisplay_tool_bar (f); + redisplay_tool_bar_p = WINDOWP (f->tool_bar_window) + && (FRAME_TOOL_BAR_LINES (f) > 0 + || auto_resize_tool_bars_p); +#endif + + if (redisplay_tool_bar_p) + redisplay_tool_bar (f); + } #endif } #ifdef HAVE_WINDOW_SYSTEM - if (update_window_fringes (w, 0) + if (FRAME_WINDOW_P (f) + && update_window_fringes (w, 0) && !just_this_one_p && (used_current_matrix_p || overlay_arrow_seen) && !w->pseudo_window_p) @@ -14911,12 +14917,10 @@ { if (!get_next_display_element (it)) { -#ifdef HAVE_WINDOW_SYSTEM it->continuation_lines_width = 0; row->ends_at_zv_p = 1; row->exact_window_width_line_p = 1; break; -#endif /* HAVE_WINDOW_SYSTEM */ } if (ITERATOR_AT_END_OF_LINE_P (it)) {