aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-02-18 01:01:51 +0000
committerRichard M. Stallman1994-02-18 01:01:51 +0000
commitdf5a440b3b364a88371fcb2e91135faa8b7db3e1 (patch)
treecf3b496ec86152332906a0561a54f42e300bbc44 /src
parent812361a197fa4a2b3753845b26aa76ebd98ca1a9 (diff)
downloademacs-df5a440b3b364a88371fcb2e91135faa8b7db3e1.tar.gz
emacs-df5a440b3b364a88371fcb2e91135faa8b7db3e1.zip
(dumpglyphs): Try various alternatives for foreground color
of a glyph with the cursor on it.
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;