← Back to team overview

dbusmenu-list team mailing list archive

Re: Proposal for aboutToShow() implementation

 

Ted Gould wrote:
> On Tue, 2010-01-12 at 10:13 +0100, Aurélien Gâteau wrote:
>> 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.
> 
> But, if we implemented the event mask that we had discussed (I don't
> think anyone has implemented it) then we would know whether a menu was
> interested in the event and we should wait.

I can't remember this event mask discussion. Care to refresh my fading
memory?

Aurélien



Follow ups

References