diff options
| author | Karoly Lorentey | 2004-10-14 14:58:43 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-10-14 14:58:43 +0000 |
| commit | ec16044407f468aacda9eb031fb7267d5ee0f899 (patch) | |
| tree | 479ac244ef6259c442f2db84d261b9be8add484e /src | |
| parent | 60126205ad630dd474129c0218eb48bb19630915 (diff) | |
| download | emacs-ec16044407f468aacda9eb031fb7267d5ee0f899.tar.gz emacs-ec16044407f468aacda9eb031fb7267d5ee0f899.zip | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index d69b456cab2..434128ea487 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -3529,7 +3529,7 @@ handle_single_display_prop (it, prop, object, position, | |||
| 3529 | && CONSP (XCDR (prop))) | 3529 | && CONSP (XCDR (prop))) |
| 3530 | { | 3530 | { |
| 3531 | /* `(raise FACTOR)'. */ | 3531 | /* `(raise FACTOR)'. */ |
| 3532 | if (FRAME_TERMCAP_P (it->f) || FRAME_MSDOS_P (it->f)) | 3532 | if (!FRAME_WINDOW_P (it->f)) |
| 3533 | return 0; | 3533 | return 0; |
| 3534 | 3534 | ||
| 3535 | #ifdef HAVE_WINDOW_SYSTEM | 3535 | #ifdef HAVE_WINDOW_SYSTEM |
| @@ -3572,7 +3572,7 @@ handle_single_display_prop (it, prop, object, position, | |||
| 3572 | when we are finished with the glyph property value. */ | 3572 | when we are finished with the glyph property value. */ |
| 3573 | 3573 | ||
| 3574 | /* `(left-fringe BITMAP FACE)'. */ | 3574 | /* `(left-fringe BITMAP FACE)'. */ |
| 3575 | if (FRAME_TERMCAP_P (it->f) || FRAME_MSDOS_P (it->f)) | 3575 | if (!FRAME_WINDOW_P (it->f)) |
| 3576 | return 0; | 3576 | return 0; |
| 3577 | 3577 | ||
| 3578 | #ifdef HAVE_WINDOW_SYSTEM | 3578 | #ifdef HAVE_WINDOW_SYSTEM |
| @@ -3646,7 +3646,7 @@ handle_single_display_prop (it, prop, object, position, | |||
| 3646 | 3646 | ||
| 3647 | valid_p = (STRINGP (value) | 3647 | valid_p = (STRINGP (value) |
| 3648 | #ifdef HAVE_WINDOW_SYSTEM | 3648 | #ifdef HAVE_WINDOW_SYSTEM |
| 3649 | || (!FRAME_TERMCAP_P (it->f) && valid_image_p (value)) | 3649 | || (FRAME_WINDOW_P (it->f) && valid_image_p (value)) |
| 3650 | #endif /* not HAVE_WINDOW_SYSTEM */ | 3650 | #endif /* not HAVE_WINDOW_SYSTEM */ |
| 3651 | || (CONSP (value) && EQ (XCAR (value), Qspace))); | 3651 | || (CONSP (value) && EQ (XCAR (value), Qspace))); |
| 3652 | 3652 | ||
| @@ -3693,11 +3693,14 @@ handle_single_display_prop (it, prop, object, position, | |||
| 3693 | #ifdef HAVE_WINDOW_SYSTEM | 3693 | #ifdef HAVE_WINDOW_SYSTEM |
| 3694 | else | 3694 | else |
| 3695 | { | 3695 | { |
| 3696 | it->what = IT_IMAGE; | 3696 | if (FRAME_WINDOW_P (it->f)) |
| 3697 | it->image_id = lookup_image (it->f, value); | 3697 | { |
| 3698 | it->position = start_pos; | 3698 | it->what = IT_IMAGE; |
| 3699 | it->object = NILP (object) ? it->w->buffer : object; | 3699 | it->image_id = lookup_image (it->f, value); |
| 3700 | it->method = next_element_from_image; | 3700 | it->position = start_pos; |
| 3701 | it->object = NILP (object) ? it->w->buffer : object; | ||
| 3702 | it->method = next_element_from_image; | ||
| 3703 | } | ||
| 3701 | 3704 | ||
| 3702 | /* Say that we haven't consumed the characters with | 3705 | /* Say that we haven't consumed the characters with |
| 3703 | `display' property yet. The call to pop_it in | 3706 | `display' property yet. The call to pop_it in |
| @@ -7828,8 +7831,7 @@ echo_area_display (update_frame_p) | |||
| 7828 | /* When Emacs starts, selected_frame may be the initial terminal | 7831 | /* When Emacs starts, selected_frame may be the initial terminal |
| 7829 | frame. If we let this through, a message would be displayed on | 7832 | frame. If we let this through, a message would be displayed on |
| 7830 | the terminal. */ | 7833 | the terminal. */ |
| 7831 | if (FRAME_TERMCAP_P (XFRAME (selected_frame)) | 7834 | if (FRAME_INITIAL_P (XFRAME (selected_frame))) |
| 7832 | && FRAME_TTY (XFRAME (selected_frame))->type == NULL) | ||
| 7833 | return 0; | 7835 | return 0; |
| 7834 | #endif /* HAVE_WINDOW_SYSTEM */ | 7836 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 7835 | #endif | 7837 | #endif |
| @@ -10404,8 +10406,9 @@ redisplay_preserve_echo_area (from_where) | |||
| 10404 | else | 10406 | else |
| 10405 | redisplay_internal (1); | 10407 | redisplay_internal (1); |
| 10406 | 10408 | ||
| 10407 | if (rif != NULL && rif->flush_display_optional) | 10409 | if (FRAME_RIF (SELECTED_FRAME ()) != NULL |
| 10408 | rif->flush_display_optional (NULL); | 10410 | && FRAME_RIF (SELECTED_FRAME ())->flush_display_optional) |
| 10411 | FRAME_RIF (SELECTED_FRAME ())->flush_display_optional (NULL); | ||
| 10409 | } | 10412 | } |
| 10410 | 10413 | ||
| 10411 | 10414 | ||
| @@ -12200,22 +12203,25 @@ redisplay_window (window, just_this_one_p) | |||
| 12200 | display_menu_bar (w); | 12203 | display_menu_bar (w); |
| 12201 | 12204 | ||
| 12202 | #ifdef HAVE_WINDOW_SYSTEM | 12205 | #ifdef HAVE_WINDOW_SYSTEM |
| 12206 | if (FRAME_WINDOW_P (f)) | ||
| 12207 | { | ||
| 12203 | #ifdef USE_GTK | 12208 | #ifdef USE_GTK |
| 12204 | redisplay_tool_bar_p = FRAME_EXTERNAL_TOOL_BAR (f); | 12209 | redisplay_tool_bar_p = FRAME_EXTERNAL_TOOL_BAR (f); |
| 12205 | #else | 12210 | #else |
| 12206 | redisplay_tool_bar_p = WINDOWP (f->tool_bar_window) | 12211 | redisplay_tool_bar_p = WINDOWP (f->tool_bar_window) |
| 12207 | && (FRAME_TOOL_BAR_LINES (f) > 0 | 12212 | && (FRAME_TOOL_BAR_LINES (f) > 0 |
| 12208 | || auto_resize_tool_bars_p); | 12213 | || auto_resize_tool_bars_p); |
| 12209 | |||
| 12210 | #endif | 12214 | #endif |
| 12211 | 12215 | ||
| 12212 | if (redisplay_tool_bar_p) | 12216 | if (redisplay_tool_bar_p) |
| 12213 | redisplay_tool_bar (f); | 12217 | redisplay_tool_bar (f); |
| 12218 | } | ||
| 12214 | #endif | 12219 | #endif |
| 12215 | } | 12220 | } |
| 12216 | 12221 | ||
| 12217 | #ifdef HAVE_WINDOW_SYSTEM | 12222 | #ifdef HAVE_WINDOW_SYSTEM |
| 12218 | if (update_window_fringes (w, 0) | 12223 | if (FRAME_WINDOW_P (f) |
| 12224 | && update_window_fringes (w, 0) | ||
| 12219 | && !just_this_one_p | 12225 | && !just_this_one_p |
| 12220 | && (used_current_matrix_p || overlay_arrow_seen) | 12226 | && (used_current_matrix_p || overlay_arrow_seen) |
| 12221 | && !w->pseudo_window_p) | 12227 | && !w->pseudo_window_p) |
| @@ -14911,12 +14917,10 @@ display_line (it) | |||
| 14911 | { | 14917 | { |
| 14912 | if (!get_next_display_element (it)) | 14918 | if (!get_next_display_element (it)) |
| 14913 | { | 14919 | { |
| 14914 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 14915 | it->continuation_lines_width = 0; | 14920 | it->continuation_lines_width = 0; |
| 14916 | row->ends_at_zv_p = 1; | 14921 | row->ends_at_zv_p = 1; |
| 14917 | row->exact_window_width_line_p = 1; | 14922 | row->exact_window_width_line_p = 1; |
| 14918 | break; | 14923 | break; |
| 14919 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 14920 | } | 14924 | } |
| 14921 | if (ITERATOR_AT_END_OF_LINE_P (it)) | 14925 | if (ITERATOR_AT_END_OF_LINE_P (it)) |
| 14922 | { | 14926 | { |