diff options
| author | Kim F. Storm | 2004-11-21 15:48:58 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2004-11-21 15:48:58 +0000 |
| commit | b5a2e277b0f03f0d834e2eb0da7c050016969427 (patch) | |
| tree | 81b11f78bfd315b4fe27b6c7cbaab6867bb83164 /src | |
| parent | e1dca3678d5b062a59e923af0b1e9cf56ffa22a5 (diff) | |
| download | emacs-b5a2e277b0f03f0d834e2eb0da7c050016969427.tar.gz emacs-b5a2e277b0f03f0d834e2eb0da7c050016969427.zip | |
(w32_clip_to_row): Add area arg. Callers changed.
(x_draw_hollow_cursor, x_draw_bar_cursor): Clip to TEXT_AREA.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32term.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/w32term.c b/src/w32term.c index fea57849ad2..5edfd5536e7 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -260,7 +260,7 @@ static void x_frame_rehighlight P_ ((struct w32_display_info *)); | |||
| 260 | static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *)); | 260 | static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *)); |
| 261 | static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int, | 261 | static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int, |
| 262 | enum text_cursor_kinds)); | 262 | enum text_cursor_kinds)); |
| 263 | static void w32_clip_to_row P_ ((struct window *, struct glyph_row *, HDC)); | 263 | static void w32_clip_to_row P_ ((struct window *, struct glyph_row *, int, HDC)); |
| 264 | 264 | ||
| 265 | static Lisp_Object Qvendor_specific_keysyms; | 265 | static Lisp_Object Qvendor_specific_keysyms; |
| 266 | 266 | ||
| @@ -691,12 +691,12 @@ w32_draw_fringe_bitmap (w, row, p) | |||
| 691 | int oldVH = row->visible_height; | 691 | int oldVH = row->visible_height; |
| 692 | row->visible_height = p->h; | 692 | row->visible_height = p->h; |
| 693 | row->y -= rowY - p->y; | 693 | row->y -= rowY - p->y; |
| 694 | w32_clip_to_row (w, row, hdc); | 694 | w32_clip_to_row (w, row, -1, hdc); |
| 695 | row->y = oldY; | 695 | row->y = oldY; |
| 696 | row->visible_height = oldVH; | 696 | row->visible_height = oldVH; |
| 697 | } | 697 | } |
| 698 | else | 698 | else |
| 699 | w32_clip_to_row (w, row, hdc); | 699 | w32_clip_to_row (w, row, -1, hdc); |
| 700 | 700 | ||
| 701 | if (p->bx >= 0 && !p->overlay_p) | 701 | if (p->bx >= 0 && !p->overlay_p) |
| 702 | { | 702 | { |
| @@ -4912,18 +4912,19 @@ w32_read_socket (sd, expected, hold_quit) | |||
| 4912 | mode lines must be clipped to the whole window. */ | 4912 | mode lines must be clipped to the whole window. */ |
| 4913 | 4913 | ||
| 4914 | static void | 4914 | static void |
| 4915 | w32_clip_to_row (w, row, hdc) | 4915 | w32_clip_to_row (w, row, area, hdc) |
| 4916 | struct window *w; | 4916 | struct window *w; |
| 4917 | struct glyph_row *row; | 4917 | struct glyph_row *row; |
| 4918 | int area; | ||
| 4918 | HDC hdc; | 4919 | HDC hdc; |
| 4919 | { | 4920 | { |
| 4920 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 4921 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 4921 | RECT clip_rect; | 4922 | RECT clip_rect; |
| 4922 | int window_y, window_width; | 4923 | int window_x, window_y, window_width; |
| 4923 | 4924 | ||
| 4924 | window_box (w, -1, 0, &window_y, &window_width, 0); | 4925 | window_box (w, area, &window_x, &window_y, &window_width, 0); |
| 4925 | 4926 | ||
| 4926 | clip_rect.left = WINDOW_TO_FRAME_PIXEL_X (w, 0); | 4927 | clip_rect.left = window_x; |
| 4927 | clip_rect.top = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); | 4928 | clip_rect.top = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); |
| 4928 | clip_rect.top = max (clip_rect.top, window_y); | 4929 | clip_rect.top = max (clip_rect.top, window_y); |
| 4929 | clip_rect.right = clip_rect.left + window_width; | 4930 | clip_rect.right = clip_rect.left + window_width; |
| @@ -4983,7 +4984,7 @@ x_draw_hollow_cursor (w, row) | |||
| 4983 | rect.right = rect.left + wd; | 4984 | rect.right = rect.left + wd; |
| 4984 | hdc = get_frame_dc (f); | 4985 | hdc = get_frame_dc (f); |
| 4985 | /* Set clipping, draw the rectangle, and reset clipping again. */ | 4986 | /* Set clipping, draw the rectangle, and reset clipping again. */ |
| 4986 | w32_clip_to_row (w, row, hdc); | 4987 | w32_clip_to_row (w, row, TEXT_AREA, hdc); |
| 4987 | FrameRect (hdc, &rect, hb); | 4988 | FrameRect (hdc, &rect, hb); |
| 4988 | DeleteObject (hb); | 4989 | DeleteObject (hb); |
| 4989 | w32_set_clip_rectangle (hdc, NULL); | 4990 | w32_set_clip_rectangle (hdc, NULL); |
| @@ -5049,7 +5050,7 @@ x_draw_bar_cursor (w, row, width, kind) | |||
| 5049 | 5050 | ||
| 5050 | 5051 | ||
| 5051 | hdc = get_frame_dc (f); | 5052 | hdc = get_frame_dc (f); |
| 5052 | w32_clip_to_row (w, row, hdc); | 5053 | w32_clip_to_row (w, row, TEXT_AREA, hdc); |
| 5053 | 5054 | ||
| 5054 | if (kind == BAR_CURSOR) | 5055 | if (kind == BAR_CURSOR) |
| 5055 | { | 5056 | { |