[Panel-devel] minimization to taskbar

Jason Stubbs jasonbstubbs at gmail.com
Sat Dec 1 16:54:56 CET 2007


On Sunday 02 December 2007 00:00:52 Robert Knight wrote:
> > Comments?
>
> - AbstractTaskItem::paint() is perhaps not the most appropriate place
> to publish updated task icon geometry, because this will lead to many
> calls during animations when the task icon may only be moving by a
> small amount on each call.  With caching enabled (in Qt 4.4) the paint()
> method might not be called when the item is just moving around.  Perhaps
> publish icon geometry in response to the ItemPositionHasChanged graphics
> item event instead, with publishing turned off during layout animations.

This was the "works" patch. ;)

I am aware that paint() isn't a good place to do it though. Even listening
for ItemPositionChanged isn't enough as that event only happens when the
position has changed with regard to the immediate parent. I guess I will
need to add an event listener like I did with the system tray. I wonder if
that functionality couldn't be moved into Widget as well...

> - Both TaskGroupItem and AbstractTaskItem implement
> publishIconGeometry(), which means that when both the task and the
> parent (a TaskGroupItem) are repainted, both will publish icon
> geometry for the task.

I had guessed that this would happen, but wasn't really going to worry about 
it. Is it a problem? Even after getting position and size change handling 
above correct, animations will cause the icon geometry publish to occur 
several times a second. If it's not a problem, I'd like to leave this as is 
for the time being as it should make changes to allow grouping of tasks by 
application easier to implement.

> Regards,
> Robert.

Cheers

> On 30/11/2007, Jason Stubbs <jasonbstubbs at gmail.com> wrote:
> > Hi all.
> >
> > I've had a go at getting the task bar to report it's position to kwin.
> > Rather than copying the code from systemtray, I've moved it into
> > Plasma::Widget so that it can be reused by anything else that might
> > need to know this sort of stuff.
> >
> > Attached are three patches:
> > * Add associatedViews(), mapToView() and mapFromView() to Widget
> > * Modify SystemTray to use the new methods
> > * Add reporting of position to kwin in tasks.cpp
> >
> > Comments?

-- 
Jason Stubbs


More information about the Panel-devel mailing list