GSoC Idea: better multi-head support

Aike J Sommer dev at aikesommer.name
Sun Mar 23 12:19:11 CET 2008


Am Sonntag 23 März 2008 11:53:45 schrieb Aaron J. Seigo:
> On Sunday 23 March 2008, Aike J Sommer wrote:
> > Am Sonntag 23 März 2008 07:30:09 schrieb Aaron J. Seigo:
> > > so ... as for the screen staying grey: the View will only respond to
> > > changes made to the associated containment. so first thing to check is
> > > that the containment is still associated with the View (it should be,
> > > but it's good to get the easy stuff that would create obvious breakage
> > > out of the way first)
> >
> > Thats problem #1, the Containment is not associated with a View, there is
> > no View for screen 1, because of:
> >
> >             if (containment->screen() > -1 &&
> >                 containment->screen() <
> > QApplication::desktop()->numScreens()) {
> >                 m_root->createDesktopView(containment);
> >
> > in PlasmaApp::createView
>
> well, of course we don't create views for screens that don't exist. the
> view should be created on demand when the screen comes into being. the
> containment may pre-exist that, of course.

Where should the View be created? I could look into whats going on there...

>
> > > next, if the geometryChanged() signal is not being emitted from the
> > > Containment, then the View won't react. now... in
> > > Containment::setScreen, resize should be being called on line 839. that
> > > should result in Applet::setGeometry being called (Widget::resize just
> > > calls setGeometry, which is a virtual method that is implemented in
> > > Applet) and in Applet::setGeometry it should be emitting
> > > geometryChanged if either the size or the position changes.
> > >
> > > possible problems: the size isn't actually changing (so no geometry
> > > change emit'd) or resize on line 839 isn't getting called for some
> > > reason.
> >
> > Problem #2: resize will not change the position, this leads to
> > geometryChanged not being emitted when only the position changes
>
> geometryChanged is emitted in Applet::setGeometry when either the size or
> position changes.
>
> > > otherwise, if the Containment is associated with the View, the View
> > > should shift what it is looking at on the Corona scene when
> > > geometryChanged is emitted.
> > >
> > > if all goes well you should actually see a line in the debug output on
> > > console that starts with: !!!!!!!!!!!!!!!!! setting the scene rect to
> >
> > With emitting containmentAdded to fix #1
>
> where did you add this exactly? (attaching patches would be great)
>
> > and changing resize() to setGeometry() to fix #2
>
> hmm ... that doesn't make much sense since resize() is:
>
> void Widget::resize(const QSizeF& size)
> {
>     setGeometry(QRectF(pos(), size));
> }
>
> so Applet::setGeometry should be getting called.

Well... But its called with the previous position, so it will not see any 
change if the size did not change... Or am i missing something here?

>
> > this line actually shows up (whenever qt actually
> > emits the signal at least), unfortunately this still doesnt result in
> > anything beeing shown... btw: the rect its changed to seems to be
> > perfectly fine: something like (1152,0 1400x1050)
>
> hmm... can you attach the patch as you have it at this point?

Thats what i have right now... Its a bit nasty especially since it triggers a 
relayout for any containment and emits containmentAdded even for containments 
which it shouldnt do it for, i just didnt find an easy way to check whether 
the containment is associated to a view or not!

:-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-01.diff
Type: text/x-diff
Size: 3500 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080323/5c2658ff/attachment.bin 


More information about the Panel-devel mailing list