diff options
| author | Kim F. Storm | 2003-12-28 00:13:34 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2003-12-28 00:13:34 +0000 |
| commit | 83c6eb57fcd9dc47e0d9ec84d40be5235985736c (patch) | |
| tree | e689bab7be22f04fdda14738d3bbb3cc97dd5dd3 /src | |
| parent | 15aa58c18e557ead24010b7c9f78bd94d5579cf8 (diff) | |
| download | emacs-83c6eb57fcd9dc47e0d9ec84d40be5235985736c.tar.gz emacs-83c6eb57fcd9dc47e0d9ec84d40be5235985736c.zip | |
(Qface, Qmouse_face): Remove unused externs.
(x_draw_hollow_cursor): Draw cursor using glyph's rather than
row's ascent and descent, to get a sensible height on tall rows.
Diffstat (limited to 'src')
| -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 a3117846702..635ba643035 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -287,7 +287,7 @@ extern Lisp_Object Vcommand_line_args, Vsystem_name; | |||
| 287 | 287 | ||
| 288 | extern Lisp_Object Vx_no_window_manager; | 288 | extern Lisp_Object Vx_no_window_manager; |
| 289 | 289 | ||
| 290 | extern Lisp_Object Qface, Qmouse_face, Qeql; | 290 | extern Lisp_Object Qeql; |
| 291 | 291 | ||
| 292 | extern int errno; | 292 | extern int errno; |
| 293 | 293 | ||
| @@ -7271,13 +7271,6 @@ x_draw_hollow_cursor (w, row) | |||
| 7271 | struct glyph *cursor_glyph; | 7271 | struct glyph *cursor_glyph; |
| 7272 | GC gc; | 7272 | GC gc; |
| 7273 | 7273 | ||
| 7274 | /* Compute frame-relative coordinates from window-relative | ||
| 7275 | coordinates. */ | ||
| 7276 | x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); | ||
| 7277 | y = (WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y) | ||
| 7278 | + row->ascent - w->phys_cursor_ascent); | ||
| 7279 | h = row->height - 1; | ||
| 7280 | |||
| 7281 | /* Get the glyph the cursor is on. If we can't tell because | 7274 | /* Get the glyph the cursor is on. If we can't tell because |
| 7282 | the current matrix is invalid or such, give up. */ | 7275 | the current matrix is invalid or such, give up. */ |
| 7283 | cursor_glyph = get_phys_cursor_glyph (w); | 7276 | cursor_glyph = get_phys_cursor_glyph (w); |
| @@ -7294,6 +7287,19 @@ x_draw_hollow_cursor (w, row) | |||
| 7294 | wd = min (FRAME_COLUMN_WIDTH (f), wd); | 7287 | wd = min (FRAME_COLUMN_WIDTH (f), wd); |
| 7295 | w->phys_cursor_width = wd; | 7288 | w->phys_cursor_width = wd; |
| 7296 | 7289 | ||
| 7290 | /* Compute frame-relative coordinates from window-relative | ||
| 7291 | coordinates. */ | ||
| 7292 | x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); | ||
| 7293 | y = WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y); | ||
| 7294 | |||
| 7295 | /* Compute the proper height and ascent of the rectangle, based | ||
| 7296 | on the actual glyph. Using the full height of the row looks | ||
| 7297 | bad when there are tall images on that row. */ | ||
| 7298 | h = max (FRAME_LINE_HEIGHT (f), cursor_glyph->ascent + cursor_glyph->descent); | ||
| 7299 | if (h < row->height) | ||
| 7300 | y += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h; | ||
| 7301 | h--; | ||
| 7302 | |||
| 7297 | /* The foreground of cursor_gc is typically the same as the normal | 7303 | /* The foreground of cursor_gc is typically the same as the normal |
| 7298 | background color, which can cause the cursor box to be invisible. */ | 7304 | background color, which can cause the cursor box to be invisible. */ |
| 7299 | xgcv.foreground = f->output_data.x->cursor_pixel; | 7305 | xgcv.foreground = f->output_data.x->cursor_pixel; |