Detecting when PopupApplet is iconified

Sebastian Kügler sebas at kde.org
Fri Mar 19 18:19:58 CET 2010


On Friday 19 March 2010 17:56:12 Rob Hasselbaum wrote:
> On Fri, Mar 19, 2010 at 12:43 PM, Sebastian Kügler <sebas at kde.org> wrote:
> > I wonder if we could just offer queueing updates from dataengines until
> > an applet is about to be shown. Especially for mobile devices, this "not
> > waking up unless shown" can be very important.
> 
> In my case, the act of getting the data is what I'm trying to prevent.
> It's expensive. So just blocking the updates from propagating between
> the data engine and the applet isn't enough. And a nice benefit of
> pausing the data engine's work is that the applet becomes idle on its
> own.

There are two cases for dataUpdated that matter here, indeed:
(1) polling / timer-based, for example refreshing RSS feeds
(2) events, for example from Solid

We want to delay (1) and just keep (2) from propagation until shown. The thing is 
that the dataEngine then would need to know about the Applet's status (is it shown so 
should I update?).

As you note, by controlling when the dataengine provides updates, we can keep Applets 
from doing work updating their state, and we can force-update the state by sending 
dataUpdated as soon as the Applet becomes shown for the dataEngines that are "dirty". 

I'm not sure if I'm missing some cornercases here, though. Ideas?
-- 
sebas

 http://www.kde.org | http://vizZzion.org |  GPG Key ID: 9119 0EF9 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20100319/fbacd3ec/attachment.sig 


More information about the Plasma-devel mailing list