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.
I set up some of the methods as invokable, so that we can export most useful
stuff. I won't add it by default though, because it could be bad.
What it needs is:
- dbus.registerObject(QStringLiteral("/PlasmaShell"), this);
+ dbus.registerObject(QStringLiteral("/PlasmaShell"), this, QDBusConnection::ExportAllContents);
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.
PlasmaShell should not be restored by the session manager. It will be
started by klauncher because we install an autostart file.
This also clears up the booting process to a certain extent, as
plasmashell will now not be started twice (once via session restore, and
once via autostart)
REVIEW: 119105