From 71de48494e9024243d4c8b8847c50c0b5c0ac16f Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 5 May 2022 21:04:48 +0800 Subject: [PATCH] Set GC line width on more GCs * src/xterm.c (x_set_cursor_gc, x_set_mouse_face_gc) (x_draw_bar_cursor): Make created scratch GCs have a line-width of 1. --- src/xterm.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 285b1d625e8..80d34c114d4 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -6044,7 +6044,10 @@ x_set_cursor_gc (struct glyph_string *s) IF_DEBUG (x_check_font (s->f, s->font)); xgcv.graphics_exposures = False; - mask = GCForeground | GCBackground | GCGraphicsExposures; + xgcv.line_width = 1; + mask = (GCForeground | GCBackground + | GCGraphicsExposures + | GCLineWidth); if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc) XChangeGC (display, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc, @@ -6076,7 +6079,11 @@ x_set_mouse_face_gc (struct glyph_string *s) xgcv.background = s->face->background; xgcv.foreground = s->face->foreground; xgcv.graphics_exposures = False; - mask = GCForeground | GCBackground | GCGraphicsExposures; + xgcv.line_width = 1; + + mask = (GCForeground | GCBackground + | GCGraphicsExposures + | GCLineWidth); if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc) XChangeGC (display, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc, @@ -19832,6 +19839,9 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text else xgcv.background = xgcv.foreground = f->output_data.x->cursor_pixel; xgcv.graphics_exposures = False; + xgcv.line_width = 1; + + mask |= GCLineWidth; if (gc) XChangeGC (dpy, gc, mask, &xgcv); -- 2.39.2