[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xterm.c,v
From: |
Kim F. Storm |
Subject: |
[Emacs-diffs] Changes to emacs/src/xterm.c,v |
Date: |
Thu, 24 Aug 2006 20:52:00 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kim F. Storm <kfstorm> 06/08/24 20:52:00
Index: xterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xterm.c,v
retrieving revision 1.923
retrieving revision 1.924
diff -u -b -r1.923 -r1.924
--- xterm.c 21 Aug 2006 08:53:32 -0000 1.923
+++ xterm.c 24 Aug 2006 20:52:00 -0000 1.924
@@ -182,6 +182,10 @@
int x_use_underline_position_properties;
+/* Non-zero means to draw the underline at the same place as the descent line.
*/
+
+int x_underline_at_descent_line;
+
/* This is a chain of structures for all the X displays currently in
use. */
@@ -2685,6 +2689,10 @@
if (!XGetFontProperty (s->font, XA_UNDERLINE_THICKNESS, &h))
h = 1;
+ if (x_underline_at_descent_line)
+ y = s->y + s->height - h;
+ else
+ {
/* Get the underline position. This is the recommended
vertical offset in pixels from the baseline to the top of
the underline. This is a signed value according to the
@@ -2698,19 +2706,18 @@
y = s->ybase + (long) tem;
else if (s->face->font)
y = s->ybase + (s->face->font->max_bounds.descent + 1) / 2;
- else
- y = s->y + s->height - h;
+ }
if (s->face->underline_defaulted_p)
XFillRectangle (s->display, s->window, s->gc,
- s->x, y, s->width, h);
+ s->x, y, s->background_width, h);
else
{
XGCValues xgcv;
XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
XSetForeground (s->display, s->gc, s->face->underline_color);
XFillRectangle (s->display, s->window, s->gc,
- s->x, y, s->width, h);
+ s->x, y, s->background_width, h);
XSetForeground (s->display, s->gc, xgcv.foreground);
}
}
@@ -2722,14 +2729,14 @@
if (s->face->overline_color_defaulted_p)
XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
- s->width, h);
+ s->background_width, h);
else
{
XGCValues xgcv;
XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
XSetForeground (s->display, s->gc, s->face->overline_color);
XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
- s->width, h);
+ s->background_width, h);
XSetForeground (s->display, s->gc, xgcv.foreground);
}
}
@@ -10979,6 +10986,14 @@
to 4.1, set this to nil. */);
x_use_underline_position_properties = 1;
+ DEFVAR_BOOL ("x-underline-at-descent-line",
+ &x_underline_at_descent_line,
+ doc: /* *Non-nil means to draw the underline at the same place as the
descent line.
+nil means to draw the underline according to the value of the variable
+`x-use-underline-position-properties', which is usually at the baseline
+level. The default value is nil. */);
+ x_underline_at_descent_line = 0;
+
DEFVAR_BOOL ("x-mouse-click-focus-ignore-position",
&x_mouse_click_focus_ignore_position,
doc: /* Non-nil means that a mouse click to focus a frame does not move
point.