Re: The new tooltips API in 5 minutes [Was: Re: Whats coming in GTK+ 2.12, continued]



On Sat, 2007-06-16 at 01:59 +0200, Tim Janik wrote:
> On Sat, 16 Jun 2007, Damon Chaplin wrote:
> 
> > On Fri, 2007-06-15 at 11:25 +0200, Tim Janik wrote:
> >> please read Kris' description again.
> >> if you set ::tooltip-markup, ::has-tooltip is set automatically, and
> >> you don't need to worry about it. this is *not* the case if you connect to
> >> ::query-tooltip and possibly return TRUE. there is no way for gtk to tell
> >> this kind of setup and querying every widget would be excessively
> >> expensive, so we need the user to set ::has-tooltip here.
> >
> > We discussed it before. I said that query-tooltip should really only be
> > emitted just before a tooltip is shown, and you agreed. If that is done
> > the efficiency problem disappears, doesn't it?
> 
> i'm not sure it does (on every machine). worst case, there would be
> widget_tree_height signal emissions for each pixel the mouse pointer
> moves or at least 20 times a second if we reduce querying to 50ms
> intervalls.

I guess you're talking about the time after the initial tooltip has
appeared, when other tooltips appear immediately as the user moves the
mouse around. (By they way, the docs for query-tooltip don't mention
this case, so need updating a bit.)

Efficiency-wise it seems comparable to how mouse motion events are
propagated up the hierarchy. It shouldn't really be a problem.

Damon





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