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 2f31dbeadf: Also show mouse DND tooltip contents during interprogram drag-and-drop
Date: Thu, 09 Jun 2022 12:18:21 +0300	[thread overview]
Message-ID: <835yla42le.fsf@gnu.org> (raw)
In-Reply-To: <87bkv2p970.fsf@yahoo.com> (message from Po Lu on Thu, 09 Jun 2022 15:50:11 +0800)

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Thu, 09 Jun 2022 15:50:11 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Instead of recording tooltip's coordinates in static C variables
> > (which then could cause potential problems with stale values),
> > wouldn't it be better to just move the tip frame from Lisp when the
> > mouse moves?
> 
> We don't record the tooltip coordinates in a C variable, just the last
> values of `dx' and `dy' passed to `x-show-tip'.  They are used to make
> sure the tooltip moves to the location relative to the mouse pointer
> specified by the caller of `x-show-tip'.
> 
> As for moving the tooltip from Lisp, that isn't possible, since we don't
> allow running Lisp code inside the drag-and-drop event loop except under
> very specific circumstances (i.e. the mouse moving onto one of our own
> frames, or inside a selection converter).

That's very unfortunate, because the current implementation is not
clean enough, IMO.  I cannot convince myself that we will never use
stale DX/DY values; can you?  Plus, using static variables means only
one such instance can ever be supported -- another restriction we'd be
better without.




  reply	other threads:[~2022-06-09  9:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-09  7:03 master 2f31dbeadf: Also show mouse DND tooltip contents during interprogram drag-and-drop Eli Zaretskii
2022-06-09  7:50 ` Po Lu
2022-06-09  9:18   ` Eli Zaretskii [this message]
2022-06-09 10:07     ` 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=835yla42le.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).