← Back to team overview

dbusmenu-list team mailing list archive

Re: Proposal for aboutToShow() implementation

 

Ted Gould wrote:
> On Mon, 2010-01-04 at 15:18 +0100, Aurélien Gâteau wrote:
>> We need a way to implement this in dbusmenu without introducing latency.
>> Here is my proposal for this:
>>
>> Add a "bool aboutToShow(id)" method to the DBus interface. This method
>> would be called when the menu is about to show and should return true if
>> the menu needs to be refreshed, false otherwise.
> 
> I guess I figured we could just use the "event" call for this.  I don't
> see why the function call needs a return, in that the signal to update
> the menu would effectively be the same as a return of TRUE in this case.

The idea of a dedicated method is to introduce the "10msec timeout
before showing the menu". It would be ugly to say "for this event the
host is going to wait 10msecs, for this other event it is not going to
wait".

Since we introduce a new method, getting the result from the return
value rather than waiting for a signal feel more efficient.

Aurélien



Follow ups

References