Mercurial > emacs
comparison src/xdisp.c @ 54068:4dcd34f2c3a7
(get_window_cursor_type, display_and_set_cursor): Fix last change.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Wed, 18 Feb 2004 21:01:50 +0000 |
parents | c09f1e11d806 |
children | 5a9638c2c889 968e8c7ff1f4 |
comparison
equal
deleted
inserted
replaced
54067:b8f2a214f98f | 54068:4dcd34f2c3a7 |
---|---|
19027 } | 19027 } |
19028 else | 19028 else |
19029 cursor_type = get_specified_cursor_type (b->cursor_type, width); | 19029 cursor_type = get_specified_cursor_type (b->cursor_type, width); |
19030 | 19030 |
19031 /* Use normal cursor if not blinked off. */ | 19031 /* Use normal cursor if not blinked off. */ |
19032 if (!w->cursor_off_p && glyph != NULL) | 19032 if (!w->cursor_off_p) |
19033 { | 19033 { |
19034 if (glyph->type == IMAGE_GLYPH) { | 19034 if (glyph != NULL && glyph->type == IMAGE_GLYPH) { |
19035 if (cursor_type == FILLED_BOX_CURSOR) | 19035 if (cursor_type == FILLED_BOX_CURSOR) |
19036 cursor_type = HOLLOW_BOX_CURSOR; | 19036 cursor_type = HOLLOW_BOX_CURSOR; |
19037 } | 19037 } |
19038 return cursor_type; | 19038 return cursor_type; |
19039 } | 19039 } |
19346 { | 19346 { |
19347 struct frame *f = XFRAME (w->frame); | 19347 struct frame *f = XFRAME (w->frame); |
19348 int new_cursor_type; | 19348 int new_cursor_type; |
19349 int new_cursor_width; | 19349 int new_cursor_width; |
19350 int active_cursor; | 19350 int active_cursor; |
19351 struct glyph_matrix *current_glyphs; | |
19352 struct glyph_row *glyph_row; | 19351 struct glyph_row *glyph_row; |
19353 struct glyph *glyph; | 19352 struct glyph *glyph; |
19354 | 19353 |
19355 /* This is pointless on invisible frames, and dangerous on garbaged | 19354 /* This is pointless on invisible frames, and dangerous on garbaged |
19356 windows and frames; in the latter case, the frame or window may | 19355 windows and frames; in the latter case, the frame or window may |
19364 | 19363 |
19365 /* If cursor is off and we want it off, return quickly. */ | 19364 /* If cursor is off and we want it off, return quickly. */ |
19366 if (!on && !w->phys_cursor_on_p) | 19365 if (!on && !w->phys_cursor_on_p) |
19367 return; | 19366 return; |
19368 | 19367 |
19369 current_glyphs = w->current_matrix; | 19368 glyph_row = MATRIX_ROW (w->current_matrix, vpos); |
19370 glyph_row = MATRIX_ROW (current_glyphs, vpos); | |
19371 glyph = (glyph_row->cursor_in_fringe_p ? NULL | |
19372 : glyph_row->glyphs[TEXT_AREA] + hpos); | |
19373 | |
19374 /* If cursor row is not enabled, we don't really know where to | 19369 /* If cursor row is not enabled, we don't really know where to |
19375 display the cursor. */ | 19370 display the cursor. */ |
19376 if (!glyph_row->enabled_p) | 19371 if (!glyph_row->enabled_p) |
19377 { | 19372 { |
19378 w->phys_cursor_on_p = 0; | 19373 w->phys_cursor_on_p = 0; |
19379 return; | 19374 return; |
19380 } | 19375 } |
19376 | |
19377 glyph = NULL; | |
19378 if (!glyph_row->exact_window_width_line_p | |
19379 || hpos < glyph_row->used[TEXT_AREA]) | |
19380 glyph = glyph_row->glyphs[TEXT_AREA] + hpos; | |
19381 | 19381 |
19382 xassert (interrupt_input_blocked); | 19382 xassert (interrupt_input_blocked); |
19383 | 19383 |
19384 /* Set new_cursor_type to the cursor we want to be displayed. */ | 19384 /* Set new_cursor_type to the cursor we want to be displayed. */ |
19385 new_cursor_type = get_window_cursor_type (w, glyph, | 19385 new_cursor_type = get_window_cursor_type (w, glyph, |