# HG changeset patch # User Kim F. Storm # Date 1128984859 0 # Node ID eefcdbee90bc4f2288efd4bc91950586ff37ec52 # Parent f9d092cc84bbdc4ebb5bbac31efac2811cb9a949 (glyph_rect): Return 0 if position is outside text area. diff -r f9d092cc84bb -r eefcdbee90bc src/xterm.c --- a/src/xterm.c Mon Oct 10 22:54:03 2005 +0000 +++ b/src/xterm.c Mon Oct 10 22:54:19 2005 +0000 @@ -3647,8 +3647,9 @@ Lisp_Object window; struct window *w; struct glyph_row *r, *end_row; - - window = window_from_coordinates (f, x, y, 0, &x, &y, 0); + enum window_part part; + + window = window_from_coordinates (f, x, y, &part, &x, &y, 0); if (NILP (window)) return 0; @@ -3656,6 +3657,9 @@ r = MATRIX_FIRST_TEXT_ROW (w->current_matrix); end_row = r + w->current_matrix->nrows - 1; + if (part != ON_TEXT) + return 0; + for (; r < end_row && r->enabled_p; ++r) { if (r->y >= y)