GSoC Idea: better multi-head support

Aike J Sommer dev at aikesommer.name
Sun Mar 23 11:31:52 CET 2008


Am Sonntag 23 März 2008 07:30:09 schrieb Aaron J. Seigo:
> On Saturday 22 March 2008, Aike J Sommer wrote:
> > Am Samstag 22 März 2008 18:25:58 schrieb Aaron J. Seigo:
> > > the code path is something like:
> > >
> > > Corona gets the screen resized(int) signal from
> > > QApplication::desktop(). it
> >
> > This doesnt seem to happen all the time... Especially on reducing the
> > resolution that signal seems to be missing... And even when its emitted
> > it will *always* report screen 0 no matter which one actually was
> > resized/enabled/disabled!
>
> hm. that's very broken, and not much we can do about in plasma if indeed
> the signal out of QDesktopWidget is malfunctioning. if we can document this
> thoroughly, then we should be able to get people at TT to look into it
> more.

Thats what i figured... I'll try to come up with some reproducable steps! :-)

>
> > > finds the current Containment associated the screen and notifies it of
> > > this; that should result in the resizing of the Containment (and, if
> > > necessary, the repositioning of it on the canvas), which then emits its
> > > geometryChanged() signal, cahsing the View to adjust what it is looking
> > > at on the Corona.
> >
> > Even with cycling through all screens (since resized only reports 0) it
> > doesnt work. It will find a desktop-containment for screen 1 (even if
> > screen 1 didnt exist before) and will call setScreen on that, but the
> > screen will just stay grey!
>
> finding a containment for screen 1 is perfectly fine. that way, when the
> screen comes back: voila, you have your containment for that screen back
> with everything you had set up on it. so that's intentional.
>
> (a possible avenue for future optimization is to "cold store" such
> containments and only run/show them when requested or when the screen comes
> back ... the exact wins of that have not been researched much, however.)
>
> 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

>
> 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

>
> 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 and changing resize() to 
setGeometry() to fix #2 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)

Any more ideas??
:-)


More information about the Panel-devel mailing list