aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2001-12-28 13:34:00 +0000
committerGerd Moellmann2001-12-28 13:34:00 +0000
commit60626bab465f140e08abbf37b7eb69a38f368fcc (patch)
tree5effd0b697e120d9aa50d4cde81cfca79a900054
parent539e92ad44425c488f308b3ed647879131a6302d (diff)
downloademacs-60626bab465f140e08abbf37b7eb69a38f368fcc.tar.gz
emacs-60626bab465f140e08abbf37b7eb69a38f368fcc.zip
(notice_overwritten_cursor): Don't depend on
output_cursor and updated_area. Compare pixel coordinates with window's cursor pixel coordinates. (x_draw_glyphs, x_clear_end_of_line, show_mouse_face): Call notice_overwritten_cursor with new arg list. (show_mouse_face): Fix bug setting a row's mouse_face_p flag unconditionally.
-rw-r--r--src/ChangeLog8
-rw-r--r--src/xterm.c39
2 files changed, 32 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6cbd7d57042..f811a4e2dde 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,13 @@
12001-12-28 Gerd Moellmann <gerd@gnu.org> 12001-12-28 Gerd Moellmann <gerd@gnu.org>
2 2
3 * xterm.c (notice_overwritten_cursor): Don't depend on
4 output_cursor and updated_area. Compare pixel coordinates with
5 window's cursor pixel coordinates.
6 (x_draw_glyphs, x_clear_end_of_line, show_mouse_face): Call
7 notice_overwritten_cursor with new arg list.
8 (show_mouse_face): Fix bug setting a row's mouse_face_p flag
9 unconditionally.
10
3 * xdisp.c (try_scrolling) <PT below scroll margin>: Add the 11 * xdisp.c (try_scrolling) <PT below scroll margin>: Add the
4 height of the cursor line to the amount to scroll. 12 height of the cursor line to the amount to scroll.
5 13
diff --git a/src/xterm.c b/src/xterm.c
index ccc54c7fb14..fd2964e4624 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -476,7 +476,8 @@ static void x_clip_to_row P_ ((struct window *, struct glyph_row *,
476 GC, int)); 476 GC, int));
477static int x_phys_cursor_in_rect_p P_ ((struct window *, XRectangle *)); 477static int x_phys_cursor_in_rect_p P_ ((struct window *, XRectangle *));
478static void x_draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row *)); 478static void x_draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row *));
479static void notice_overwritten_cursor P_ ((struct window *, int, int)); 479static void notice_overwritten_cursor P_ ((struct window *, enum glyph_row_area,
480 int, int, int, int));
480static void x_flush P_ ((struct frame *f)); 481static void x_flush P_ ((struct frame *f));
481static void x_update_begin P_ ((struct frame *)); 482static void x_update_begin P_ ((struct frame *));
482static void x_update_window_begin P_ ((struct window *)); 483static void x_update_window_begin P_ ((struct window *));
@@ -5207,7 +5208,8 @@ x_draw_glyphs (w, x, row, area, start, end, hl, overlaps_p)
5207 x1 -= left_area_width; 5208 x1 -= left_area_width;
5208 } 5209 }
5209 5210
5210 notice_overwritten_cursor (w, x0, x1); 5211 notice_overwritten_cursor (w, area, x0, x1,
5212 row->y, MATRIX_ROW_BOTTOM_Y (row));
5211 } 5213 }
5212 5214
5213 /* Value is the x-position up to which drawn, relative to AREA of W. 5215 /* Value is the x-position up to which drawn, relative to AREA of W.
@@ -5429,7 +5431,10 @@ x_clear_end_of_line (to_x)
5429 5431
5430 /* Notice if the cursor will be cleared by this operation. */ 5432 /* Notice if the cursor will be cleared by this operation. */
5431 if (!updated_row->full_width_p) 5433 if (!updated_row->full_width_p)
5432 notice_overwritten_cursor (w, output_cursor.x, -1); 5434 notice_overwritten_cursor (w, updated_area,
5435 output_cursor.x, -1,
5436 updated_row->y,
5437 MATRIX_ROW_BOTTOM_Y (updated_row));
5433 5438
5434 from_x = output_cursor.x; 5439 from_x = output_cursor.x;
5435 5440
@@ -7780,7 +7785,8 @@ show_mouse_face (dpyinfo, draw)
7780 x_draw_glyphs (w, start_x, row, TEXT_AREA, 7785 x_draw_glyphs (w, start_x, row, TEXT_AREA,
7781 start_hpos, end_hpos, draw, 0); 7786 start_hpos, end_hpos, draw, 0);
7782 7787
7783 row->mouse_face_p = draw == DRAW_MOUSE_FACE || DRAW_IMAGE_RAISED; 7788 row->mouse_face_p
7789 = draw == DRAW_MOUSE_FACE || draw == DRAW_IMAGE_RAISED;
7784 } 7790 }
7785 } 7791 }
7786 7792
@@ -11098,22 +11104,25 @@ XTread_socket (sd, bufp, numchars, expected)
11098 Text Cursor 11104 Text Cursor
11099 ***********************************************************************/ 11105 ***********************************************************************/
11100 11106
11101/* Notice if the text cursor of window W has been overwritten by a 11107/* Notice when the text cursor of window W has been completely
11102 drawing operation that outputs N glyphs starting at START_X and 11108 overwritten by a drawing operation that outputs glyphs in AREA
11103 ending at END_X in the line given by output_cursor.vpos. 11109 starting at X0 and ending at X1 in the line starting at Y0 and
11104 Coordinates are area-relative. END_X < 0 means all the rest 11110 ending at Y1. X coordinates are area-relative. X1 < 0 means all
11105 of the line after START_X has been written. */ 11111 the rest of the line after X0 has been written. Y coordinates
11112 are window-relative. */
11106 11113
11107static void 11114static void
11108notice_overwritten_cursor (w, start_x, end_x) 11115notice_overwritten_cursor (w, area, x0, x1, y0, y1)
11109 struct window *w; 11116 struct window *w;
11110 int start_x, end_x; 11117 enum glyph_row_area area;
11118 int x0, y0, x1, y1;
11111{ 11119{
11112 if (updated_area == TEXT_AREA 11120 if (area == TEXT_AREA
11113 && w->phys_cursor_on_p 11121 && w->phys_cursor_on_p
11114 && output_cursor.vpos == w->phys_cursor.vpos 11122 && y0 <= w->phys_cursor.y
11115 && start_x <= w->phys_cursor.x 11123 && y1 >= w->phys_cursor.y + w->phys_cursor_height
11116 && (end_x < 0 || end_x > w->phys_cursor.x)) 11124 && x0 <= w->phys_cursor.x
11125 && (x1 < 0 || x1 > w->phys_cursor.x))
11117 w->phys_cursor_on_p = 0; 11126 w->phys_cursor_on_p = 0;
11118} 11127}
11119 11128