unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: master 77c3d41adc: Prevent text decorations from overwriting surrounding areas on X
Date: Tue, 11 Jan 2022 08:37:11 +0800	[thread overview]
Message-ID: <87k0f7p0p4.fsf@yahoo.com> (raw)
In-Reply-To: <8335lva3ev.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 10 Jan 2022 19:47:36 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

> 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?

That's only done in x_draw_underwave, and nowhere else where text
decorations (underlines and overlines) are drawn.

>> 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.

After loading the definition of widget-field, just do this in an empty
buffer:

  (set-face-attribute 'default nil :underline t)
  (save-excursion
    (insert (propertize "foo\n" 'face 'widget-field)))
  (redisplay)
  (insert "a")

The underline of the first line will then overwrite the right fringe.



  reply	other threads:[~2022-01-11  0:37 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
2022-01-11  0:37       ` Po Lu [this message]
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=87k0f7p0p4.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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).