aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1998-06-20 03:01:00 +0000
committerKenichi Handa1998-06-20 03:01:00 +0000
commita9a5b0a53c0c91b5025aa806557803e136501ac3 (patch)
tree4330e5e9c766be42143cb1cd00c46a4bc870b132 /src
parent63d3d7841a93dc55a15d5b2531e678a3a5e8f9ef (diff)
downloademacs-a9a5b0a53c0c91b5025aa806557803e136501ac3.tar.gz
emacs-a9a5b0a53c0c91b5025aa806557803e136501ac3.zip
(dumpglyphs): Check the case that FACE_FONT (face) is
NULL. While displaing cursor with non-default face, if the variable `font' is NULL, don't set GCFont.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 565e9205ca7..582eb2fd5fb 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -783,7 +783,7 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground, cmpcharp)
783 if (charset == CHARSET_ASCII || charset == charset_latin_iso8859_1) 783 if (charset == CHARSET_ASCII || charset == charset_latin_iso8859_1)
784 { 784 {
785 font = FACE_FONT (face); 785 font = FACE_FONT (face);
786 if (font == (XFontStruct *) FACE_DEFAULT) 786 if (!font || font == (XFontStruct *) FACE_DEFAULT)
787 font = f->output_data.x->font; 787 font = f->output_data.x->font;
788 baseline = FONT_BASE (f->output_data.x->font); 788 baseline = FONT_BASE (f->output_data.x->font);
789 if (charset == charset_latin_iso8859_1) 789 if (charset == charset_latin_iso8859_1)
@@ -837,12 +837,14 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground, cmpcharp)
837 xgcv.background = face->foreground; 837 xgcv.background = face->foreground;
838 xgcv.foreground = face->background; 838 xgcv.foreground = face->background;
839 } 839 }
840 if (font)
841 xgcv.font = font->fid;
842 else
843 xgcv.font = FACE_FONT (face)->fid;
844 xgcv.graphics_exposures = 0; 840 xgcv.graphics_exposures = 0;
845 mask = GCForeground | GCBackground | GCFont | GCGraphicsExposures; 841 mask = GCForeground | GCBackground | GCGraphicsExposures;
842 if (font)
843 {
844 xgcv.font = font->fid;
845 mask |= GCFont;
846 }
847
846 if (FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc) 848 if (FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc)
847 XChangeGC (FRAME_X_DISPLAY (f), 849 XChangeGC (FRAME_X_DISPLAY (f),
848 FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc, 850 FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc,