]> git.eshelyaron.com Git - emacs.git/commitdiff
Set GC line width on more GCs
authorPo Lu <luangruo@yahoo.com>
Thu, 5 May 2022 13:04:48 +0000 (21:04 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 5 May 2022 13:05:25 +0000 (21:05 +0800)
* 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

index 285b1d625e89910545160ed6aa29d2741bf60a25..80d34c114d474ad6a4f01c5adb860005c9c578c5 100644 (file)
@@ -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);