Mercurial > emacs
comparison src/xterm.c @ 66003:eefcdbee90bc
(glyph_rect): Return 0 if position is outside text area.
| author | Kim F. Storm <storm@cua.dk> |
|---|---|
| date | Mon, 10 Oct 2005 22:54:19 +0000 |
| parents | 42e5365826f1 |
| children | 699f7f132908 |
comparison
equal
deleted
inserted
replaced
| 66002:f9d092cc84bb | 66003:eefcdbee90bc |
|---|---|
| 3645 XRectangle *rect; | 3645 XRectangle *rect; |
| 3646 { | 3646 { |
| 3647 Lisp_Object window; | 3647 Lisp_Object window; |
| 3648 struct window *w; | 3648 struct window *w; |
| 3649 struct glyph_row *r, *end_row; | 3649 struct glyph_row *r, *end_row; |
| 3650 | 3650 enum window_part part; |
| 3651 window = window_from_coordinates (f, x, y, 0, &x, &y, 0); | 3651 |
| 3652 window = window_from_coordinates (f, x, y, &part, &x, &y, 0); | |
| 3652 if (NILP (window)) | 3653 if (NILP (window)) |
| 3653 return 0; | 3654 return 0; |
| 3654 | 3655 |
| 3655 w = XWINDOW (window); | 3656 w = XWINDOW (window); |
| 3656 r = MATRIX_FIRST_TEXT_ROW (w->current_matrix); | 3657 r = MATRIX_FIRST_TEXT_ROW (w->current_matrix); |
| 3657 end_row = r + w->current_matrix->nrows - 1; | 3658 end_row = r + w->current_matrix->nrows - 1; |
| 3659 | |
| 3660 if (part != ON_TEXT) | |
| 3661 return 0; | |
| 3658 | 3662 |
| 3659 for (; r < end_row && r->enabled_p; ++r) | 3663 for (; r < end_row && r->enabled_p; ++r) |
| 3660 { | 3664 { |
| 3661 if (r->y >= y) | 3665 if (r->y >= y) |
| 3662 { | 3666 { |
