[Panel-devel] minimization to taskbar

Jason Stubbs jasonbstubbs at gmail.com
Sun Dec 2 11:23:44 CET 2007


On Sunday 02 December 2007 06:11:53 Aaron J. Seigo wrote:
> On Saturday 01 December 2007, Jason Stubbs wrote:
> > On Sunday 02 December 2007 00:00:52 Robert Knight wrote:
> > 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...
>
> i like the idea of this going into Widget when it is ready. i don't think
> 4.4 will remove the need for that code as it's mapping between the sceen
> and x11 geometries, something i'm not sure is there even in the 4.4 widget
> support? (i could be wrong on that)

As discussed on IRC, the main issue is that items only know when they have 
changed position relative to their parent's geometry. I can't tell from the 
documentation, but using a QWidget sub-class that overrides moveEvent() in 
conjunction with QGraphicsWidgetProxy might suffice.

Also as per IRC, I've had a look at getting parent widgets to pass 
ItemPositionHasChanged events down to children that want to receive them.
I've attached patches to widget and systemtray separately. Most of the 
codepaths are untested though as it seems that systemtray is a top-level 
widget on the panel, which implies that checking for scene changes is 
unnecessary work in the current code.

Kudos to anybody who can think of better function and variables names. ;)

Also, this still doesn't address a view changing the scene rect that it is 
viewing or any other transformations (like zoom).

> > On Sunday 02 December 2007 00:00:52 Robert Knight wrote:
> > > - 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
>
> these can easily be compressed with a timer, though. also, the layout
> animator is rather broken right now and needs to be fixed so that items
> stop animating a *lot* sooner than they do right now (run with
> QT_FLUSH_PAINT to see the full effect of the animations); the animator is
> doing too many small fine adjustments, particularly at the end, that just
> don't matter visually.

I haven't looked at this aspect yet. I think I might leave the taskbar until 
a "final" solution to the systray handling above is agreed upon.

-- 
Jason Stubbs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: widget.patch
Type: text/x-diff
Size: 7093 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071202/b3f8b0d1/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: systray.patch
Type: text/x-diff
Size: 5695 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071202/b3f8b0d1/attachment-0003.bin 


More information about the Panel-devel mailing list