diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2003-12-28 16:05:28 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2003-12-28 16:05:28 +0000 |
commit | 8ed48c277afad174675b3d6dcb8e7b00a4bcc97d (patch) | |
tree | 53d9baa35f9420264e2f53ad4db850c400c3e2c6 /src/xterm.c | |
parent | 2e7f2ec031f1708b80df9dc1f60f6b1cb24a5c02 (diff) | |
parent | 69348b2a71cbabeb23e3b7d5dce354c5bc4bd311 (diff) | |
download | emacs-8ed48c277afad174675b3d6dcb8e7b00a4bcc97d.tar.gz emacs-8ed48c277afad174675b3d6dcb8e7b00a4bcc97d.tar.bz2 emacs-8ed48c277afad174675b3d6dcb8e7b00a4bcc97d.zip |
Merged in changes from CVS HEAD
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-1
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-2
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-3
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-17
Diffstat (limited to 'src/xterm.c')
-rw-r--r-- | src/xterm.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/xterm.c b/src/xterm.c index 30de48aa5e7..e01a5e540fd 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -287,7 +287,7 @@ extern Lisp_Object Vcommand_line_args, Vsystem_name; extern Lisp_Object Vx_no_window_manager; -extern Lisp_Object Qface, Qmouse_face, Qeql; +extern Lisp_Object Qeql; extern int errno; @@ -7270,13 +7270,6 @@ x_draw_hollow_cursor (w, row) struct glyph *cursor_glyph; GC gc; - /* Compute frame-relative coordinates from window-relative - coordinates. */ - x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); - y = (WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y) - + row->ascent - w->phys_cursor_ascent); - h = row->height - 1; - /* Get the glyph the cursor is on. If we can't tell because the current matrix is invalid or such, give up. */ cursor_glyph = get_phys_cursor_glyph (w); @@ -7293,6 +7286,19 @@ x_draw_hollow_cursor (w, row) wd = min (FRAME_COLUMN_WIDTH (f), wd); w->phys_cursor_width = wd; + /* Compute frame-relative coordinates from window-relative + coordinates. */ + x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); + y = WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y); + + /* 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 (FRAME_LINE_HEIGHT (f), cursor_glyph->ascent + cursor_glyph->descent); + if (h < row->height) + y += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h; + h--; + /* The foreground of cursor_gc is typically the same as the normal background color, which can cause the cursor box to be invisible. */ xgcv.foreground = f->output_data.x->cursor_pixel; |