emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 2f31dbeadf: Also show mouse DND tooltip contents during inter


From: Eli Zaretskii
Subject: Re: master 2f31dbeadf: Also show mouse DND tooltip contents during interprogram drag-and-drop
Date: Thu, 09 Jun 2022 12:18:21 +0300

> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]