/* X Communication module for terminals which understand the X protocol.
-Copyright (C) 1989, 1993-2012 Free Software Foundation, Inc.
+Copyright (C) 1989, 1993-2013 Free Software Foundation, Inc.
This file is part of GNU Emacs.
Faces to use in the mode line have already been computed when the
matrix was built, so there isn't much to do, here. */
-static inline void
+static void
x_set_mode_line_face_gc (struct glyph_string *s)
{
s->gc = s->face->gc;
S->stippled_p to a non-zero value if the face of S has a stipple
pattern. */
-static inline void
+static void
x_set_glyph_string_gc (struct glyph_string *s)
{
PREPARE_FACE_FOR_DISPLAY (s->f, s->face);
/* Set clipping for output of glyph string S. S may be part of a mode
line or menu if we don't have X toolkit support. */
-static inline void
+static void
x_set_glyph_string_clipping (struct glyph_string *s)
{
XRectangle *r = s->clip;
/* Fill rectangle X, Y, W, H with background color of glyph string S. */
-static inline void
+static void
x_clear_glyph_string_rect (struct glyph_string *s, int x, int y, int w, int h)
{
XGCValues xgcv;
static void
x_draw_underwave (struct glyph_string *s)
{
- int wave_height = 2, wave_length = 3;
+ int wave_height = 3, wave_length = 2;
int dx, dy, x0, y0, width, x1, y1, x2, y2, odd, xmax;
XRectangle wave_clip, string_clip, final_clip;
dx = wave_length;
dy = wave_height - 1;
x0 = s->x;
- y0 = s->ybase + 1;
+ y0 = s->ybase - wave_height + 3;
width = s->width;
xmax = x0 + width;
unsigned long thickness, position;
int y;
- if (s->prev && s->prev->face->underline_p)
+ if (s->prev && s->prev->face->underline_p
+ && s->prev->face->underline_type == FACE_UNDER_LINE)
{
/* We use the same underline style as the previous one. */
thickness = s->prev->underline_thickness;
/* Don't stop displaying the initial startup message
for a switch-frame event we don't need. */
- if (NILP (Vterminal_frame)
+ /* When run as a daemon, Vterminal_frame is always NIL. */
+ if ((NILP (Vterminal_frame) || EQ (Fdaemonp(), Qt))
&& CONSP (Vframe_list)
&& !NILP (XCDR (Vframe_list)))
{