emacs-devel
[Top][All Lists]
Advanced

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

RE: Fix some tooltip related problems


From: Drew Adams
Subject: RE: Fix some tooltip related problems
Date: Thu, 11 Jan 2018 11:50:10 -0800 (PST)

>  > 1. Can users with a GTK build today use Lisp code that decides
>  > which to use in any given (Lisp) context?  How is that done
>  > in Lisp?
> 
> The option `x-gtk-use-system-tooltips' decides whether to use system
> or Emacs tooltips.  This is a user option and should never be set by
> Lisp code.

Then that doesn't satisfy what I requested:

  "being able to choose for any given context which to use"
                        ---------------------
  "Can we let Lisp code (and so users too) decide, here or
   there, which kind of tooltip to use (heavyweight "Emacs"
   or lightweight "system")?"

>  > 2. What do you mean by "set up tooltip controls" on Windows?
>
> Windows uses the term "tooltip controls" for its native tooltips.  In
> order to use tooltip controls, an application programmer has to set
> them up, that is, write the necessary API routines.

So if no one "has the time to set up tooltip controls on
Windows" then we have what we have now on Windows: "Emacs"
tooltips - which is fine.

>  > Today, on Windows you can at least use faces in tooltips.
>  > (Dunno about using images, but I'm guessing that's OK too.)
> 
> A tooltip frame is a normal top-level frame that can be used like any
> other frame.  It has some restrictions (no margins, fringes, scroll
> bars) but a criminal mind might be able to relieve some of them.

That's all good, and what I expected but wasn't sure -
"Emacs" tooltips are plenty flexible.

>  > But perhaps you mean that on Windows there are _only_
>  > "Emacs" tooltips, not "system" tooltips?  From my point of
>  > view that's not a problem - flexible beats inflexible.  You
>  > say that tooltips on Windows are "heavyweight" and "incur
>  > an entire GC cycle", but I've never noticed any performance
>  > problem with them - on Emacs 20 through 26.
> 
> Probably because you don't use a battery or maybe you just don't care.

I don't use a battery.

I guess you're suggesting that "Emacs" tooltips, which are
apparently all we have on Windows, are too slow for use with
a battery.  And you expect that no one will provide the
choice of "system" tooltips on Windows.

So from your point of view, tooltips on Windows should
typically be turned off (at least by users) when a battery
is used, so the info goes to the echo area.  That's OK.

Ignoring any battery users on Windows who don't turn off
tooltips, we have what we need on Windows.  (Yes, a Lisp
choice would be even better, but if no one provides it...)

And users on gtk-build systems can choose.  Choice should
also be available to Lisp functions, as use cases differ.
It's of course possible to let a user option allow for
Lisp control or override/prevent it, au choix.

Today, does changing the value of that user option change
the behavior dynamically?  E.g., if you did change the
value using a given Lisp function would the behavior change?

If so then some specific contexts could, by default, use
"Emacs" tooltips, while other contexts did not.

For example, tooltip-dimming for mode-line mouseover
could be done for non-Windows also, without imposing "Emacs"
tooltips everywhere.  And users could prevent that dimming
using option `x-gtk-use-system-tooltips'.

Since that's apparently possible for more than just Windows,
including for at least some GNU/Linux builds, that's what
we should do by default.  I didn't propose it earlier
because I thought you were saying that it is only Windows
that supports faces in tooltips, and I know that we don't
tailor default Emacs behavior for Windows only.



reply via email to

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