aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c22
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;
287 287
288extern Lisp_Object Vx_no_window_manager; 288extern Lisp_Object Vx_no_window_manager;
289 289
290extern Lisp_Object Qface, Qmouse_face, Qeql; 290extern Lisp_Object Qeql;
291 291
292extern int errno; 292extern int errno;
293 293
@@ -7270,13 +7270,6 @@ x_draw_hollow_cursor (w, row)
7270 struct glyph *cursor_glyph; 7270 struct glyph *cursor_glyph;
7271 GC gc; 7271 GC gc;
7272 7272
7273 /* Compute frame-relative coordinates from window-relative
7274 coordinates. */
7275 x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x);
7276 y = (WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y)
7277 + row->ascent - w->phys_cursor_ascent);
7278 h = row->height - 1;
7279
7280 /* Get the glyph the cursor is on. If we can't tell because 7273 /* Get the glyph the cursor is on. If we can't tell because
7281 the current matrix is invalid or such, give up. */ 7274 the current matrix is invalid or such, give up. */
7282 cursor_glyph = get_phys_cursor_glyph (w); 7275 cursor_glyph = get_phys_cursor_glyph (w);
@@ -7293,6 +7286,19 @@ x_draw_hollow_cursor (w, row)
7293 wd = min (FRAME_COLUMN_WIDTH (f), wd); 7286 wd = min (FRAME_COLUMN_WIDTH (f), wd);
7294 w->phys_cursor_width = wd; 7287 w->phys_cursor_width = wd;
7295 7288
7289 /* Compute frame-relative coordinates from window-relative
7290 coordinates. */
7291 x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x);
7292 y = WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y);
7293
7294 /* Compute the proper height and ascent of the rectangle, based
7295 on the actual glyph. Using the full height of the row looks
7296 bad when there are tall images on that row. */
7297 h = max (FRAME_LINE_HEIGHT (f), cursor_glyph->ascent + cursor_glyph->descent);
7298 if (h < row->height)
7299 y += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h;
7300 h--;
7301
7296 /* The foreground of cursor_gc is typically the same as the normal 7302 /* The foreground of cursor_gc is typically the same as the normal
7297 background color, which can cause the cursor box to be invisible. */ 7303 background color, which can cause the cursor box to be invisible. */
7298 xgcv.foreground = f->output_data.x->cursor_pixel; 7304 xgcv.foreground = f->output_data.x->cursor_pixel;