emacs-devel
[Top][All Lists]
Advanced

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

Re: Sv: Sticky tooltips


From: Arthur Miller
Subject: Re: Sv: Sticky tooltips
Date: Mon, 05 Oct 2020 11:27:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: arthur miller <arthur.miller@live.com>
>> CC: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
>> Date: Thu, 1 Oct 2020 02:28:25 +0000
>> 
>> I am not sure how to get buffer out of x-show-tip,
>
> ??? The name of the buffer is fixed: " *tip*" (with the leading
> space).  You can even switch to it interactively, and see the text
> there (it would be the text of the last tootlip displayed), provided
> that your build is not GTK, or if it is GTK, you've turned off GTK
> tooltips and switched to the native ones.
>
>> I don't know how the function would deal with Gtk tooltips; if they can also 
>> take a buffer
>> and display it, that is why I mean the function to take string-or-buffer.
>
> We'd need to modify the code to stash the tooltip text in some buffer
> or variable.

It was actually even easier; C code can just get ready-made-buffer on
it's own, does not even need it passed in as argument; and for Gtk,
nothing changes, a string can be send and it does not need to be
propertized.

I've sent yesterday patch in another thread; I can resend in this one if
it is preferable.

Where do I find the mouse motion callback for tooltips? 

The idea is to not dismiss the tooltip frame during the timer period so
that user have time to tick the checkbox. When timer times out then the
tooltip frame can be dismissed. And if checkbox was ticked, the frame
will be dismissed when user uncheck the box.

This also leaves question how it will behave if a tooltip frame is live
on the screen and another tooltip frame is "requested". I haven't looked
into C code to see if multiple tooltip frames can be live or not; can
take a look after the mouse motion callback is fixed.

Today I have also removed some unnecessary 'propertize' call, but it is
not essential so I can send it in later.



reply via email to

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