From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org
Subject: Re: master 77c3d41adc: Prevent text decorations from overwriting surrounding areas on X
Date: Mon, 10 Jan 2022 19:47:36 +0200 [thread overview]
Message-ID: <8335lva3ev.fsf@gnu.org> (raw)
In-Reply-To: <87zgo3pzu3.fsf@yahoo.com> (message from Po Lu on Mon, 10 Jan 2022 19:58:12 +0800)
> From: Po Lu <luangruo@yahoo.com>
> Date: Mon, 10 Jan 2022 19:58:12 +0800
>
> Po Lu via Mailing list for Emacs changes <emacs-diffs@gnu.org> writes:
>
> > Prevent text decorations from overwriting surrounding areas on X
> >
> > * src/xterm.c (x_draw_underwave): New parameter
> > `decoration_width'.
> > (x_draw_glyph_string): Constrain decoration width to current
> > text area.
>
> This happens on X because nothing actually clips the decoration to the
> string's area when we draw the decoration.
I'm not sure I understand what clipping did you have in mind. In
x_draw_underwave, for example, we have this:
/* Find and set clipping rectangle */
wave_clip.x = x0;
wave_clip.y = y0;
wave_clip.width = width;
wave_clip.height = wave_height;
get_glyph_string_clip_rect (s, &string_clip);
if (!gui_intersect_rectangles (&wave_clip, &string_clip, &final_clip))
return;
XSetClipRectangles (display, s->gc, 0, 0, &final_clip, 1, Unsorted);
Isn't this the clipping? Or what am I missing?
> You can test by running custom-set-faces on default, enabling an
> underline or overline, and typing in a field that is extended to the end
> of the line.
Please show some actual Lisp to try this, so we wouldn't need to guess
whether the problem doesn't exist or we failed to reproduce correctly.
next prev parent reply other threads:[~2022-01-10 17:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <164181573002.27254.10999604516337949526@vcs2.savannah.gnu.org>
[not found] ` <20220110115530.E4B34C0DA1D@vcs2.savannah.gnu.org>
2022-01-10 11:58 ` master 77c3d41adc: Prevent text decorations from overwriting surrounding areas on X Po Lu
2022-01-10 17:47 ` Eli Zaretskii [this message]
2022-01-11 0:37 ` Po Lu
2022-01-11 12:42 ` Eli Zaretskii
2022-01-11 13:18 ` Po Lu
2022-01-11 13:35 ` Eli Zaretskii
2022-01-12 1:56 ` Po Lu
2022-01-12 2:30 ` Jose Antonio Ortega Ruiz
2022-01-12 3:05 ` Po Lu
2022-01-12 3:48 ` Jose Antonio Ortega Ruiz
2022-01-12 3:29 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8335lva3ev.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).