this places the responsibility on the shell package and removes
the assumption that the alternatives UI is a dialog that is placed
alongside the applet. that, my friends, is a desktop form factor
assumption.
rather than implementing it as a (harder to read) recursive
function, simply start from the second-to-last item in the list and
march backwards until it hits the index being removed, moving the
panels and desktop forward as it goes.
previously it was starting from the index being removed, moving
the panels to the next screen, then processing the next screen
at which point all the panels on idx would now be on idx+1's screen
and they'd get pushed forward again. on a 4 screen system with
panels on each i bet that was fun to watch.
this should be both less buggy and easier to comprehend code.
The primaryOutput method in KScreen is not consistent with Output::isPrimary
and made plasma shell become a bit inconsistent too.
Loop through the outputs for now, until we've got a better solution.
BUG: 338109
CCBUG: 335710
Have separate code paths instead, otherwise we'd end up inserting the same
containments twice.
Also add an assert to make sure this doesn't happen anymore.
CCBUG:337928
So far, when initializing plasma shell some plasmoids would trigger a
warning in ShellCorona::screenForContainment saying that the requested
screen was not found.
This patch fixes the issue by introducing the screens to the views list
earlier, this way when screenForContainment is called, we already have
the list initialized. Now the problem is that we get some inconsistencies,
because QApp::processEvents is called from within View::setContainment.
This results in requests to the PlasmaShell on half-baked instances and
resulted in problems. That's why I introduced the loading attribute that
wraps setContainment calls.
REVIEW: 119554
if there isn't a containment existing for the screen, create it.
even if the whole corona is locked.
needed for instance if a new screen is conencted and we're locked
or a locked sessin starts with a malformed appletsrc
BUG:337200
if there isn't a containment existing for the screen, create it.
even if the whole corona is locked.
needed for instance if a new screen is conencted and we're locked
or a locked sessin starts with a malformed appletsrc
BUG:337200
Make sure the screen is not added until the containment is defined and the
screen is shown.
Don't check if a screen is redundant to itself.
Also delay output redundancy using the timer, until the screen is taken
care for. Also delay the timer a bit further as all the screen management
takes quite some time.
Only set the screen right before triggering show(), otherwise it can mess
up for reasons I don't know.
Also I prefer not to pass the screen in the constructor, given that we
move the DesktopView instances across screens and it gives the wrong
impression that the view is tied to the screen.