diff options
author | Miles Bader <miles@gnu.org> | 2005-01-29 00:06:24 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2005-01-29 00:06:24 +0000 |
commit | 5f85994ad17fbe952504bfafb49fbef4ded186af (patch) | |
tree | 33522e4a7a8ddc7c7efa704bd6264f9722ad4ce8 /src/w32term.c | |
parent | 87795686a9e8ea51ec492d01d7dce4698b14f3af (diff) | |
parent | aba1948af5107ad44c467e4f97792af5ce75a7d7 (diff) | |
download | emacs-5f85994ad17fbe952504bfafb49fbef4ded186af.tar.gz |
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-7
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-52
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-53
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-54
Update from CVS: lisp/cus-start.el (all): Add `undo-outer-limit'.
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-55
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-57
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-58
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-7
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-8
- miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-11
Update from CVS
Diffstat (limited to 'src/w32term.c')
-rw-r--r-- | src/w32term.c | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/src/w32term.c b/src/w32term.c index bffdd8f2565..151afb7e841 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -5088,7 +5088,7 @@ x_draw_hollow_cursor (w, row) struct frame *f = XFRAME (WINDOW_FRAME (w)); HDC hdc; RECT rect; - int wd, h; + int h; struct glyph *cursor_glyph; HBRUSH hb = CreateSolidBrush (f->output_data.w32->cursor_pixel); @@ -5098,34 +5098,12 @@ x_draw_hollow_cursor (w, row) if (cursor_glyph == NULL) return; - /* Compute frame-relative coordinates from window-relative - coordinates. */ + /* Compute frame-relative coordinates for phys cursor. */ rect.left = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); - rect.top = (WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y) - + row->ascent - w->phys_cursor_ascent); - - /* Compute the proper height and ascent of the rectangle, based - on the actual glyph. Using the full height of the row looks - bad when there are tall images on that row. */ - h = max (min (FRAME_LINE_HEIGHT (f), row->height), - cursor_glyph->ascent + cursor_glyph->descent); - if (h < row->height) - rect.top += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h; - h--; - + rect.top = get_phys_cursor_geometry (w, row, cursor_glyph, &h); rect.bottom = rect.top + h; + rect.right = rect.left + w->phys_cursor_width; - /* Compute the width of the rectangle to draw. If on a stretch - glyph, and `x-stretch-block-cursor' is nil, don't draw a - rectangle as wide as the glyph, but use a canonical character - width instead. */ - wd = cursor_glyph->pixel_width; /* TODO: Why off by one compared with X? */ - if (cursor_glyph->type == STRETCH_GLYPH - && !x_stretch_cursor_p) - wd = min (FRAME_COLUMN_WIDTH (f), wd); - w->phys_cursor_width = wd; - - rect.right = rect.left + wd; hdc = get_frame_dc (f); /* Set clipping, draw the rectangle, and reset clipping again. */ w32_clip_to_row (w, row, TEXT_AREA, hdc); |