don't do the Containment resizeEvent dance unless it is actually being used as a containment

svn path=/trunk/KDE/kdelibs/; revision=1118056
This commit is contained in:
Aaron J. Seigo 2010-04-23 19:06:55 +00:00
parent 59505c7f07
commit 9278caf4a0

View File

@ -1021,12 +1021,10 @@ void Containment::setScreen(int newScreen, int newDesktop)
}
}
if (newScreen < numScreens && newScreen > -1) {
if (d->type == DesktopContainment ||
d->type >= CustomContainment) {
if (newScreen < numScreens && newScreen > -1 &&
(d->type == DesktopContainment || d->type >= CustomContainment)) {
resize(corona()->screenGeometry(newScreen).size());
}
}
int oldDesktop = d->desktop;
d->desktop = newDesktop;
@ -1595,6 +1593,7 @@ void Containment::resizeEvent(QGraphicsSceneResizeEvent *event)
{
Applet::resizeEvent(event);
if (isContainment()) {
if (d->isPanelContainment()) {
d->positionPanel();
} else if (corona()) {
@ -1605,6 +1604,7 @@ void Containment::resizeEvent(QGraphicsSceneResizeEvent *event)
d->wallpaper->setBoundingRect(QRectF(QPointF(0, 0), size()));
}
}
}
void Containment::keyPressEvent(QKeyEvent *event)
{