[Panel-devel] minimization to taskbar

Jason Stubbs jasonbstubbs at gmail.com
Thu Dec 6 16:38:03 CET 2007


On Thursday 06 December 2007 01:42:32 Aaron J. Seigo wrote:
> On Wednesday 05 December 2007, Jason Stubbs wrote:
> > On Monday 03 December 2007 02:35:48 Aaron J. Seigo wrote:
> > > that said, i still think it is too expensive to do the bookkeeping in
> > > each widget. if a widget is interested in tracking this information.
> >
> > It's actually not that high. The only (semi-)hot path affected is
> > itemChange's ItemPositionHashChanged event which has this false
> > condition:
>
> there's also memory usage with an extra QList per widget. these things have
> a way of accreting into monsters (see Plasma::Applet ;)

These new patches have no extra members on anything inside libplasma. :)

The premise with these patches is that applets (rather than widgets) are 
notified when their scene-relative position changes. Strictly speaking they 
are only notified with respect to their containment, but that currently 
equates to the same thing.

For the libplasma patch, you should be familiar with the changes in Widget. 
The only thing different is that associatedViews() has become view() based on 
the assumption that any applet that needs to know about views can't deal with 
more than one. The other change is to make the applet handle notify the 
applet when its position changes.

(I just realized that AppletHandle's notifications should probably be done is 
mouseReleaseEvent() so I'll fix that tomorrow.)

Tasks is a little bit longer than the last patch due to the applet sub-class 
needing to propogate position change information to its widget sub-classes.
It's still not much code needed to get the job done though. :)

System tray ended up being a big patch as I've moved a couple of things 
around, but it has similarly ended up being easier to read.

Behaviour in the panel has no problems and behaviour on the desktop is mostly 
ok. The only thing that doesn't work at all is desktop zooming. Given that 
these patches affect much less, I think that's a small price to pay. :)

-- 
Jason Stubbs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libplasma.patch
Type: text/x-diff
Size: 4096 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071207/cc62d314/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tasks.patch
Type: text/x-diff
Size: 2979 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071207/cc62d314/attachment-0001.bin 


More information about the Panel-devel mailing list