Mercurial > emacs
comparison src/xdisp.c @ 79619:f92febffffdd
(phys_cursor_in_rect_p): Check if cursor is in fringe area.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Mon, 24 Dec 2007 03:01:15 +0000 |
parents | 6044d42748d3 |
children | fc2bcd2a8aad cdd30283527d |
comparison
equal
deleted
inserted
replaced
79618:589a31597086 | 79619:f92febffffdd |
---|---|
23479 struct window *w; | 23479 struct window *w; |
23480 XRectangle *r; | 23480 XRectangle *r; |
23481 { | 23481 { |
23482 XRectangle cr, result; | 23482 XRectangle cr, result; |
23483 struct glyph *cursor_glyph; | 23483 struct glyph *cursor_glyph; |
23484 struct glyph_row *row; | |
23485 | |
23486 if (w->phys_cursor.vpos >= 0 | |
23487 && w->phys_cursor.vpos < w->current_matrix->nrows | |
23488 && (row = MATRIX_ROW (w->current_matrix, w->phys_cursor.vpos), | |
23489 row->enabled_p) | |
23490 && row->cursor_in_fringe_p) | |
23491 { | |
23492 /* Cursor is in the fringe. */ | |
23493 cr.x = window_box_right_offset (w, | |
23494 (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) | |
23495 ? RIGHT_MARGIN_AREA | |
23496 : TEXT_AREA)); | |
23497 cr.y = row->y; | |
23498 cr.width = WINDOW_RIGHT_FRINGE_WIDTH (w); | |
23499 cr.height = row->height; | |
23500 return x_intersect_rectangles (&cr, r, &result); | |
23501 } | |
23484 | 23502 |
23485 cursor_glyph = get_phys_cursor_glyph (w); | 23503 cursor_glyph = get_phys_cursor_glyph (w); |
23486 if (cursor_glyph) | 23504 if (cursor_glyph) |
23487 { | 23505 { |
23488 /* r is relative to W's box, but w->phys_cursor.x is relative | 23506 /* r is relative to W's box, but w->phys_cursor.x is relative |