summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1993-05-14 14:44:26 +0000
committerJim Blandy <jimb@redhat.com>1993-05-14 14:44:26 +0000
commit4a4dc352d55f6ab7f8a3c7941ef0238caf2075ba (patch)
treee053acd485ff94e132a42573dc98af0d6189181a
parentf6b98e0be9be1c213281df3edf774b3ae909afa4 (diff)
downloademacs-4a4dc352d55f6ab7f8a3c7941ef0238caf2075ba.tar.gz
* xterm.c (dumpglyphs): Give the cursor higher priority than the
face specified by the glyph under it. * xterm.c (dumpglyphs): Move the underline up a row. I dislike the way X addresses pixels. Quickdraw is much nicer. * xterm.c (dumpglyphs): Pass the proper arguments to intern_face. * xterm.c (dumpglyphs): Don't increment left twice.
-rw-r--r--src/xterm.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 97ebb079acf..58733c1efa3 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -457,7 +457,14 @@ dumpglyphs (f, left, top, gp, n, hl)
FONT_TYPE *font = FACE_FONT (face);
GC gc = FACE_GC (face);
- if (cf != 0)
+ /* Cursor display take full precidence. */
+ if (hl == 2)
+ {
+ gc = (f->display.x->cursor_gc);
+ }
+
+ /* Then comes faces of the text itself. */
+ else if (cf != 0)
{
/* The face codes on the glyphs must be valid indices into the
frame's face table. */
@@ -467,10 +474,12 @@ dumpglyphs (f, left, top, gp, n, hl)
if (cf == 1)
face = FRAME_MODE_LINE_FACE (f);
else
- face = intern_face (FRAME_FACES (f) [cf]);
+ face = intern_face (f, FRAME_FACES (f) [cf]);
font = FACE_FONT (face);
gc = FACE_GC (face);
}
+
+ /* Then comes the distinction between modeline and normal text. */
else if (hl == 0)
;
else if (hl == 1)
@@ -479,23 +488,18 @@ dumpglyphs (f, left, top, gp, n, hl)
font = FACE_FONT (face);
gc = FACE_GC (face);
}
- else if (hl == 2)
- {
- gc = (f->display.x->cursor_gc);
- }
XDrawImageString (x_current_display, window, gc,
left, top + FONT_BASE (font), buf, len);
- left += len * FONT_WIDTH (font);
/* We should probably check for XA_UNDERLINE_POSITION and
XA_UNDERLINE_THICKNESS properties on the font, but let's
just get the thing working, and come back to that. */
{
- int underline_position = 2;
+ int underline_position = 1;
- if (font->descent < underline_position)
- underline_position = font->descent;
+ if (font->descent <= underline_position)
+ underline_position = font->descent - 1;
if (face->underline)
XFillRectangle (x_current_display, FRAME_X_WINDOW (f),