Changeset 3057
- Timestamp:
- 03/11/03 00:17:50 (6 years ago)
- Files:
-
- work/cvs2svn/src/ChangeLog.Meadow (modified) (1 diff)
- work/cvs2svn/src/mw32term.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
work/cvs2svn/src/ChangeLog.Meadow
r3055 r3057 1 2003-03-11 MIYOSHI Masanori <miyoshi@boreas.dti.ne.jp> 2 3 * mw32term.c (mw32_draw_glyphs): Change the condition to correct 4 the row position. Sync up with Emacs-21.3.50. 5 (mw32_draw_glyphs): Call notice_overwritten_cursor(). 6 (mw32i_write_glyphs): Invalidate old phys cursor if the glyph at 7 its hpos is redrawn. Sync up with Emacs-21.3.50. 8 (mw32i_insert_glyphs): Don't call notice_overwritten_cursor(). 9 (notice_overwritten_cursor): Sync up with Emacs-21.3.50. 10 (mw32_erase_phys_cursor): If row is completely invisible, don't 11 attempt to delete a cursor which isn't there. Sync up with 12 Emacs-21.3.50. 13 1 14 2003-03-09 MIYOSHI Masanori <miyoshi@boreas.dti.ne.jp> 2 15 work/cvs2svn/src/mw32term.c
r3048 r3057 419 419 static void note_mouse_highlight P_ ((struct frame *, int, int)); 420 420 static void note_tool_bar_highlight P_ ((struct frame *f, int, int)); 421 static void notice_overwritten_cursor P_ ((struct window *, int, int)); 421 static void notice_overwritten_cursor P_ ((struct window *, 422 enum glyph_row_area, 423 int, int, int, int)); 422 424 static void show_mouse_face P_ ((struct mw32_display_info *, 423 425 enum draw_glyphs_face)); … … 4983 4985 x1 = FRAME_TO_WINDOW_PIXEL_X (w, x1); 4984 4986 4985 if ( XFASTINT (w->left_margin_width) != 0)4987 if (!row->full_width_p && XFASTINT (w->left_margin_width) != 0) 4986 4988 { 4987 4989 int left_area_width = window_box_width (w, LEFT_MARGIN_AREA); … … 4989 4991 x1 -= left_area_width; 4990 4992 } 4991 if (updated_area == TEXT_AREA 4992 && w->phys_cursor_on_p 4993 && output_cursor.vpos == w->phys_cursor.vpos 4994 && x0 <= w->phys_cursor.x 4995 && (x1 < 0 || x1 > w->phys_cursor.x)) 4996 w->phys_cursor_on_p = 0; 4993 4994 notice_overwritten_cursor (w, area, x0, x1, 4995 row->y, MATRIX_ROW_BOTTOM_Y (row)); 4997 4996 } 4998 4997 … … 5085 5084 &real_start, &real_end, 0); 5086 5085 5087 /* If we drew over the cursor, note that it is not visible any more. */ 5088 notice_overwritten_cursor (updated_window, real_start, 5089 real_end - real_start); 5086 /* Invalidate old phys cursor if the glyph at its hpos is redrawn. */ 5087 if (updated_area == TEXT_AREA 5088 && updated_window->phys_cursor_on_p 5089 && updated_window->phys_cursor.vpos == output_cursor.vpos 5090 && updated_window->phys_cursor.hpos >= hpos 5091 && updated_window->phys_cursor.hpos < hpos + len) 5092 updated_window->phys_cursor_on_p = 0; 5093 5090 5094 /* If we should require GdiFlush(), 5091 5095 insert here. */ … … 5143 5147 mw32_draw_glyphs (w, output_cursor.x, row, updated_area, hpos, hpos + len, 5144 5148 DRAW_NORMAL_TEXT, &real_start, &real_end, 0); 5145 notice_overwritten_cursor (w, real_start, real_end - real_start);5146 5149 5147 5150 /* Advance the output cursor. */ … … 5206 5209 /* Notice if the cursor will be cleared by this operation. */ 5207 5210 if (!updated_row->full_width_p) 5208 notice_overwritten_cursor (w, output_cursor.hpos, -1); 5211 notice_overwritten_cursor (w, updated_area, 5212 output_cursor.x, -1, 5213 updated_row->y, 5214 MATRIX_ROW_BOTTOM_Y (updated_row)); 5209 5215 5210 5216 from_x = output_cursor.x; … … 8993 8999 ***********************************************************************/ 8994 9000 8995 /* Notice if the text cursor of window W has been overwritten by a8996 drawing operation that outputs N glyphs starting at HPOS in the8997 line given by output_cursor.vpos.8998 8999 N < 0 means all the rest of the line after HPOS has been9000 written. */9001 /* Notice when the text cursor of window W has been completely 9002 overwritten by a drawing operation that outputs glyphs in AREA 9003 starting at X0 and ending at X1 in the line starting at Y0 and 9004 ending at Y1. X coordinates are area-relative. X1 < 0 means all 9005 the rest of the line after X0 has been written. Y coordinates 9006 are window-relative. */ 9001 9007 9002 9008 static void 9003 notice_overwritten_cursor (struct window *w, 9004 int hpos, int n) 9005 { 9006 if (updated_area == TEXT_AREA 9007 && output_cursor.vpos == w->phys_cursor.vpos 9008 && output_cursor.x <= w->phys_cursor.x 9009 && w->phys_cursor_on_p) 9010 { 9011 if (n < 0) 9012 w->phys_cursor_on_p = 0; 9013 else 9014 { 9015 /* It depends on the width of the N glyphs written at HPOS 9016 if the cursor has been overwritten or not. */ 9017 struct glyph *glyph = &updated_row->glyphs[TEXT_AREA][hpos]; 9018 struct glyph *end = glyph + n; 9019 int width = 0; 9020 9021 for (; glyph < end; ++glyph) 9022 width += glyph->pixel_width; 9023 9024 if (output_cursor.x + width > w->phys_cursor.x) 9009 notice_overwritten_cursor (w, area, x0, x1, y0, y1) 9010 struct window *w; 9011 enum glyph_row_area area; 9012 int x0, x1, y0, y1; 9013 { 9014 if (area == TEXT_AREA && w->phys_cursor_on_p) 9015 { 9016 struct frame *f = XFRAME (WINDOW_FRAME (w)); 9017 int cx0 = w->phys_cursor.x; 9018 int cx1 = cx0 + f->output_data.mw32->cursor_width; 9019 int cy0 = w->phys_cursor.y; 9020 int cy1 = cy0 + w->phys_cursor_height; 9021 9022 if (x0 <= cx0 && (x1 < 0 || x1 >= cx1)) 9023 { 9024 /* The cursor image will be completely removed from the 9025 screen if the output area intersects the cursor area in 9026 y-direction. When we draw in [y0 y1[, and some part of 9027 the cursor is at y < y0, that part must have been drawn 9028 before. When scrolling, the cursor is erased before 9029 actually scrolling, so we don't come here. When not 9030 scrolling, the rows above the old cursor row must have 9031 changed, and in this case these rows must have written 9032 over the cursor image. 9033 9034 Likewise if part of the cursor is below y1, with the 9035 exception of the cursor being in the first blank row at 9036 the buffer and window end because update_text_area 9037 doesn't draw that row. (Except when it does, but 9038 that's handled in update_text_area.) */ 9039 9040 if (((y0 >= cy0 && y0 < cy1) || (y1 > cy0 && y1 < cy1)) 9041 && w->current_matrix->rows[w->phys_cursor.vpos].displays_text_p) 9025 9042 w->phys_cursor_on_p = 0; 9026 9043 } … … 9220 9237 { 9221 9238 int on_p = w->phys_cursor_on_p; 9222 9239 9223 9240 mw32_draw_glyphs (w, w->phys_cursor.x, row, TEXT_AREA, 9224 9241 w->phys_cursor.hpos, w->phys_cursor.hpos + 1, 9225 9242 hl, 0, 0, 0); 9226 9243 w->phys_cursor_on_p = on_p; 9227 9244 9228 9245 /* When we erase the cursor, and ROW is overlapped by other 9229 9246 rows, make sure that these overlapping parts of other rows … … 9274 9291 goto mark_cursor_off; 9275 9292 9293 /* If row is completely invisible, don't attempt to delete a cursor which 9294 isn't there. This may happen if cursor is at top of window, and 9295 we switch to a buffer with a header line in that window. */ 9296 if (cursor_row->visible_height <= 0) 9297 goto mark_cursor_off; 9298 9276 9299 /* This can happen when the new row is shorter than the old one. 9277 9300 In this case, either x_draw_glyphs or clear_end_of_line
