Subject: Re: bug#52324: 29.0.50; "Padded" mode line lacks uniform border

From: Po Lu <[email-masked]>
Date: Sun, 12 Dec 2021 10:48:35 +0800

Po Lu <[email-masked]> writes:

> The correct solution is to move this code:
>
>       /* Draw relief if not yet drawn.  */
>       if (!relief_drawn_p && s->face->box != FACE_NO_BOX)
> 	x_draw_glyph_string_box (s);
>
> To run before drawing the overline.  I tested and it works here, so if
> you have no objections I will make that change in xterm and on the other
> *terms as well.

BTW, the Haiku port has the same problem, but with a very different
cause, even though text decorations are already drawn after the box:
drawing the box on such glyphs sets a special kind of graphics clipping
that prevents anything from being displayed on top of the box
afterwards.

This is done for a variety of subtle reasons that are too complicated to
explain here.

To solve it there, I made the subroutine in charge of displaying the box
draw text decorations before setting the special clipping.  It's TRT, as
everything said clipping is supposed to prevent happens after it
returns.

So as a heads up, please don't take the changes made to the Haiku port
as representative of how to solve this problem.