aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 5580fbdda69..7a4a718374d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -569,7 +569,25 @@ dumpglyphs (f, left, top, gp, n, hl)
569 unsigned long mask; 569 unsigned long mask;
570 570
571 xgcv.background = f->display.x->cursor_pixel; 571 xgcv.background = f->display.x->cursor_pixel;
572 xgcv.foreground = f->display.x->cursor_foreground_pixel; 572 if (face == FRAME_DEFAULT_FACE (f))
573 xgcv.foreground = f->display.x->cursor_foreground_pixel;
574 else
575 xgcv.foreground = face->foreground;
576 /* If the glyph would be invisible,
577 try a different foreground. */
578 if (xgcv.foreground == xgcv.background)
579 xgcv.foreground = face->background;
580 if (xgcv.foreground == xgcv.background)
581 xgcv.foreground = f->display.x->cursor_foreground_pixel;
582 if (xgcv.foreground == xgcv.background)
583 xgcv.foreground = face->foreground;
584 /* Make sure the cursor is distinct from text in this face. */
585 if (xgcv.background == face->background
586 && xgcv.foreground == face->foreground)
587 {
588 xgcv.background = face->foreground;
589 xgcv.foreground = face->background;
590 }
573 xgcv.font = face->font->fid; 591 xgcv.font = face->font->fid;
574 xgcv.graphics_exposures = 0; 592 xgcv.graphics_exposures = 0;
575 mask = GCForeground | GCBackground | GCFont | GCGraphicsExposures; 593 mask = GCForeground | GCBackground | GCFont | GCGraphicsExposures;