unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org
Subject: Re: master 5743b74d4b 1/2: Improve mouse dragging
Date: Thu, 12 May 2022 10:31:54 +0300	[thread overview]
Message-ID: <83sfpfp5p1.fsf@gnu.org> (raw)

> branch: master
> commit 5743b74d4b2e06ace233d6b170f193a72633f218
> Author: Po Lu <luangruo@yahoo.com>
> Commit: Po Lu <luangruo@yahoo.com>
> 
>     Improve mouse dragging
>     
>     * lisp/mouse.el (mouse-drag-and-drop-region-display-tooltip):
>     Respect foreground and background parameters.
>     (mouse-drag-and-drop-region): Enable fine grained tracking.
> ---
>  lisp/mouse.el | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/lisp/mouse.el b/lisp/mouse.el
> index 0446bc6dd8..4b5f6ed223 100644
> --- a/lisp/mouse.el
> +++ b/lisp/mouse.el
> @@ -3017,7 +3017,15 @@ highlight the original region when
>    "Display TOOLTIP, a tooltip string, using `x-show-tip'.
>  Call `tooltip-show-help-non-mode' instead on non-graphical displays."
>    (if (display-graphic-p)
> -      (x-show-tip tooltip)
> +      (let ((params (copy-sequence tooltip-frame-parameters))
> +	    (fg (face-attribute 'tooltip :foreground))
> +	    (bg (face-attribute 'tooltip :background)))
> +	(when (stringp fg)
> +	  (setf (alist-get 'foreground-color params) fg)
> +	  (setf (alist-get 'border-color params) fg))
> +	(when (stringp bg)
> +	  (setf (alist-get 'background-color params) bg))
> +        (x-show-tip tooltip nil params))
>      (tooltip-show-help-non-mode tooltip)))

Maybe I'm missing something here, but this seems to force the faces of
the tooltip frames to follow the attributes of faces of the frame that
is the selected frame when the tooltip is shown.  Since faces are
per-frame, why is this a good idea, and what problems does the above
change attempt to solve?  (And why do we force the border color to be
the same as the tooltip-frame's foreground color?)



             reply	other threads:[~2022-05-12  7:31 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12  7:31 Eli Zaretskii [this message]
2022-05-12 12:03 ` master 5743b74d4b 1/2: Improve mouse dragging 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
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=83sfpfp5p1.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).