]> git.eshelyaron.com Git - emacs.git/commitdiff
Use an explicit line width of 1 on hollow cursors under X
authorRadon Rosborough <radon.neon@gmail.com>
Thu, 13 May 2021 09:40:59 +0000 (11:40 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 13 May 2021 09:44:36 +0000 (11:44 +0200)
* src/xterm.c (x_draw_hollow_cursor): Specify a line width of
1 explicitly to avoid problems on some X implementations (bug#42452).

src/xterm.c

index a663a0f1844cb78403ad2d13178b3eabeebe4463..bdf0804f89546e9b983cd1e290d7fb3ed59dd0fd 100644 (file)
@@ -9599,11 +9599,12 @@ x_draw_hollow_cursor (struct window *w, struct glyph_row *row)
   /* 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;
+  xgcv.line_width = 1;
   if (dpyinfo->scratch_cursor_gc)
-    XChangeGC (dpy, dpyinfo->scratch_cursor_gc, GCForeground, &xgcv);
+    XChangeGC (dpy, dpyinfo->scratch_cursor_gc, GCForeground | GCLineWidth, &xgcv);
   else
     dpyinfo->scratch_cursor_gc = XCreateGC (dpy, FRAME_X_DRAWABLE (f),
-                                           GCForeground, &xgcv);
+                                           GCForeground | GCLineWidth, &xgcv);
   gc = dpyinfo->scratch_cursor_gc;
 
   /* When on R2L character, show cursor at the right edge of the