make corona's offscreenwidgets list accessible, don't reposition

containments that are in offscreen widgets

svn path=/trunk/KDE/kdelibs/; revision=950841
This commit is contained in:
Marco Martin 2009-04-07 21:22:18 +00:00
parent deb92dbdf5
commit 875688e040
3 changed files with 13 additions and 1 deletions

View File

@ -1781,7 +1781,8 @@ void ContainmentPrivate::positionContainments()
while (it.hasNext()) {
Containment *containment = it.next();
if (containment->d->type == Containment::PanelContainment ||
containment->d->type == Containment::CustomPanelContainment) {
containment->d->type == Containment::CustomPanelContainment ||
q->corona()->offscreenWidgets().contains(containment)) {
// weed out all containments we don't care about at all
// e.g. Panels and ourself
it.remove();

View File

@ -426,6 +426,11 @@ void Corona::removeOffscreenWidget(QGraphicsWidget *widget)
}
}
QList <QGraphicsWidget *> Corona::offscreenWidgets() const
{
return d->offscreenWidgets.values();
}
void CoronaPrivate::offscreenWidgetDestroyed(QObject *o)
{
// at this point, it's just a QObject, not a QGraphicsWidget, but we still need

View File

@ -114,6 +114,12 @@ public:
*/
void removeOffscreenWidget(QGraphicsWidget *widget);
/**
* @return the list of all offscreen widgets
* @since 4.3
*/
QList <QGraphicsWidget *> offscreenWidgets() const;
/**
* Returns the number of screens available to plasma.
* Subclasses should override this method as the default