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 5743b74d4b 1/2: Improve mouse dragging
Date: Thu, 12 May 2022 21:23:19 +0800	[thread overview]
Message-ID: <87bkw2yjeg.fsf@yahoo.com> (raw)
In-Reply-To: <83h75uq4id.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 12 May 2022 16:12:10 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

> "Used to use"?  And now we don't?  But your changes are in
> tooltip-show, so if we don't use it anymore, why the changes?

My changes are in `mouse-drag-and-drop-region-display-tooltip', which is
used by the `mouse-drag-and-drop-region' feature to display a tooltip
that follows the mouse.  I didn't touch `tooltip-show' at all.

> Could you possibly post a more detailed response, one which would
> explain that change starting from how this stuff behaves in Emacs 28
> and why we needed to change it in Emacs 29, without omitting any
> crucial details?

The behavior in Emacs 28 is a serious bug (and a regression from Emacs
27) caused by the code that lets Emacs 28 display variable-width fonts
in tooltips, but apparently nobody was using that particular feature
during the entire development process of Emacs 28, so it wasn't found in
time for the release.

That code would add text properties to the `text' argument to
`x-show-tip', which is bad, because `mouse-drag-and-drop-region'
reinserts the string passed as `text' into the buffer the mouse was
dropped on top of afterwards, which causes the inserted text to be
propertized with the wrong face.

I fixed that bug in `mouse-drag-and-drop-region' this March by making it
use `x-show-tip' directly instead of `tooltip-show' (it is safe because
we don't do anything `tooltip-show' would not.)  But it turns out that
`tooltip-show' does some processing on the frame parameters to make them
reflect the background and foreground colors of the tooltip face before
passing them to `x-show-tip', the absence of which caused tooltip colors
set by some themes to not take effect in tooltips shown while dragging
text, which is what this change fixes.  That was fixed by this change.

Thanks.



  parent reply	other threads:[~2022-05-12 13:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12  7:31 master 5743b74d4b 1/2: Improve mouse dragging Eli Zaretskii
2022-05-12 12:03 ` Po Lu
2022-05-12 12:47   ` Eli Zaretskii
2022-05-12 13:02     ` Po Lu
2022-05-12 13:12       ` Eli Zaretskii
2022-05-12 13:20         ` Eli Zaretskii
2022-05-12 13:25           ` Po Lu
2022-05-12 13:23         ` Po Lu [this message]
2022-05-12 13:51           ` Eli Zaretskii
2022-05-13  0:27             ` Po Lu
2022-05-13  6:00               ` Eli Zaretskii
2022-05-13  7:05                 ` Po Lu
2022-05-13  7:36                   ` Eli Zaretskii
2022-05-13  7:49                     ` Po Lu
2022-05-13 10:32                       ` Eli Zaretskii
2022-05-13 11:10                         ` Po Lu
2022-05-13 12:08                           ` Eli Zaretskii
2022-05-13 12:45                             ` Po Lu
2022-05-13 12:48                               ` Eli Zaretskii
2022-05-13 12:16                           ` Eli Zaretskii
2022-05-13 12:46                             ` Po Lu
2022-05-12 15:49       ` [External] : " Drew Adams
2022-05-13  0:28         ` Po Lu
2022-05-13  1:49           ` Drew Adams
2022-05-13  3:42             ` Po Lu
2022-05-13 15:30               ` Drew Adams
2022-05-14  0:56                 ` Po Lu

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=87bkw2yjeg.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).