check the parentlayoutitem too

svn path=/trunk/KDE/kdelibs/; revision=1013416
This commit is contained in:
Marco Martin 2009-08-19 20:06:47 +00:00
parent d940a82878
commit e2e97757ca

View File

@ -190,7 +190,9 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints)
}
//99% of the times q->parentWidget() is the containment, but using it we can also manage the applet-in-applet case (i.e. systray)
if (q->parentWidget()) {
if (q->parentLayoutItem()) {
parentSize = q->parentLayoutItem()->geometry().size();
} else if (q->parentWidget()) {
parentSize = q->parentWidget()->size();
}