On March 18, 2010, Rob Hasselbaum wrote:
> On Thu, Mar 18, 2010 at 11:04 AM, Marco Martin <notm...@gmail.com> wrote:
> > what are you exactly trying to accomplish?

thanks for asking the Right Question(tm) :)

> > usually you shouldn't care of a detail like that
> 
> I have a data engine that pushes data to my applet asynchronously. When the
> applet isn't being shown, I want to disconnect from the source to reduce
> CPU overhead.

i can think of various hacks to accomplish this, but they aren't particularly 
pretty and i only know they'll work because i know how things work internally 
(which is never a good sign for a "solution" ;)

i think the only clean solution to this would be to offer a bool 
PopupApplet::isIconified() const method.

btw, i sat here for a few minutes trying to discount your use case, but it is 
a valid one imho. if it is't being shown to the user, the applet should at 
least have a chance of not waking up the cpu.

my only question now is how to handle notification of the change. my first 
thought would be to add a new Contraint (IconifiedConstraint?) and then the 
applet could respond in constraintsEvent.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to