pass on the screen constraint to applets when changing the screen of a containment. thanks to Sebas for figuring out what was triggering it (lack of constraints events being passed on)

BUGS:201247,233054

svn path=/trunk/KDE/kdelibs/; revision=1136747
This commit is contained in:
Aaron J. Seigo 2010-06-10 16:30:54 +00:00
parent c0c3ccabe3
commit fd535c68e1

View File

@ -2293,9 +2293,19 @@ void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constra
}
}
if (constraints & Plasma::FormFactorConstraint) {
// pass on the constraints that are relevant here
Constraints appletConstraints = NoConstraint;
if (constraints & FormFactorConstraint) {
appletConstraints |= FormFactorConstraint;
}
if (constraints & ScreenConstraint) {
appletConstraints |= ScreenConstraint;
}
if (appletConstraints != NoConstraint) {
foreach (Applet *applet, applets) {
applet->updateConstraints(Plasma::FormFactorConstraint);
applet->updateConstraints(appletConstraints);
}
}