unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: emacs-devel@gnu.org
Subject: Re: Mouse highlighting and fonts
Date: Mon, 26 May 2008 23:26:56 -0400	[thread overview]
Message-ID: <87od6spgu7.fsf@stupidchicken.com> (raw)
In-Reply-To: <87tzgog5kd.fsf@stupidchicken.com> (Chong Yidong's message of "Fri, 23 May 2008 15:53:54 -0400")

Chong Yidong <cyd@stupidchicken.com> writes:

> BTW, another mouse-highlighting bug I reported earlier is still present.
> Under certain circumstances, the area to the left and/or right of the
> physical cursor doesn't acquire the proper mouse-face.
>
> This appears to be a long-standing bug, but one that didn't show up
> until the new font code.  That's because it arises as follows: when the
> cursor glyph has a nonzero lbearing or rbearing (i.e., it overlaps with
> its neighbors), the neighboring glyphs are redrawn, and this can
> overwrite the mouse-face highlight.  See xdisp.c:19934.  This didn't
> show up because previously, overlapping glyphs were generally not
> encountered.
>
> I'll try to fix this once I get the time, unless someone else fixes it
> first.

I've checked in a rough fix into CVS.  It turns out that fixing this
properly is non-trivial, due to limitations in the way the glyph-drawing
code.  I think the fix handles most (all?)  situations likely to happen
in practice.  It might lead to incorrect highlighting if a glyph's
overhang is large enough to overlap two or more neighboring glyphs, and
not all those glyphs are mouse-highlighted, but I can't find a test-case
that demonstrates this.

There is a remaining related bug: when the cursor falls inside a
mouse-highlighted block, its foreground is sometimes drawn incorrectly.
I think this is a bug elsewhere in the code, possibly related to the
incorrect drawing of glyphs that I've noticed in other contexts
unrelated to mouse highlighting.  Currently I have no idea what causes
this.

Other than that, if anyone still has problems with mouse highlighting,
please holler.




  parent reply	other threads:[~2008-05-27  3:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-23 15:09 Mouse highlighting and fonts Chong Yidong
2008-05-23 19:53 ` Chong Yidong
2008-05-24 23:02   ` Stephen Berman
2008-05-25  2:01   ` Chong Yidong
2008-05-25  4:46     ` YAMAMOTO Mitsuharu
2008-05-25  8:21       ` Gerd Möllmann
2008-05-27  8:58     ` Johan Bockgård
2008-05-27  3:26   ` Chong Yidong [this message]
2008-05-27 13:24     ` Stephen Berman

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=87od6spgu7.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --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).