diff --git a/applet.cpp b/applet.cpp index e0b359a38..ba6466548 100644 --- a/applet.cpp +++ b/applet.cpp @@ -1936,9 +1936,9 @@ void Applet::lower() setZValue(--AppletPrivate::s_minZValue); } -void AppletPrivate::setIsContainment(bool nowIsContainment) +void AppletPrivate::setIsContainment(bool nowIsContainment, bool forceUpdate) { - if (isContainment == nowIsContainment) { + if (isContainment == nowIsContainment && !forceUpdate) { return; } diff --git a/corona.cpp b/corona.cpp index ca5855d43..86f57a401 100644 --- a/corona.cpp +++ b/corona.cpp @@ -152,8 +152,9 @@ public: containment->setFormFactor(Plasma::Planar); } + static_cast(containment)->d->isContainment = true; q->addItem(containment); - static_cast(containment)->d->setIsContainment(true); + static_cast(containment)->d->setIsContainment(true, true); containments.append(containment); if (!delayedInit) { diff --git a/private/applet_p.h b/private/applet_p.h index 6fb8e3b33..82e15ef71 100644 --- a/private/applet_p.h +++ b/private/applet_p.h @@ -62,7 +62,7 @@ public: /** * Sets whether or not this Applet is acting as a Containment */ - void setIsContainment(bool isContainment); + void setIsContainment(bool isContainment, bool forceUpdate = false); QString globalName() const; QString instanceName();