when checking for custom containments, use >= now

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800672
This commit is contained in:
Aaron J. Seigo 2008-04-24 16:16:50 +00:00
parent cb6af63eb7
commit 0fe77de70f
2 changed files with 3 additions and 3 deletions

View File

@ -865,7 +865,7 @@ Applet::List Containment::applets() const
void Containment::setScreen(int screen) void Containment::setScreen(int screen)
{ {
// screen of -1 means no associated screen. // screen of -1 means no associated screen.
if (containmentType() == DesktopContainment || containmentType() == CustomContainment) { if (containmentType() == DesktopContainment || containmentType() >= CustomContainment) {
#ifndef Q_OS_WIN #ifndef Q_OS_WIN
// we want to listen to changes in work area if our screen changes // we want to listen to changes in work area if our screen changes
if (d->screen < 0 && screen > -1) { if (d->screen < 0 && screen > -1) {
@ -894,7 +894,7 @@ void Containment::setScreen(int screen)
//kDebug() << "setting screen to " << screen << "and type is" << containmentType(); //kDebug() << "setting screen to " << screen << "and type is" << containmentType();
if (screen < numScreens && screen > -1) { if (screen < numScreens && screen > -1) {
if (containmentType() == DesktopContainment || if (containmentType() == DesktopContainment ||
containmentType() == CustomContainment) { containmentType() >= CustomContainment) {
resize(desktop->screenGeometry(screen).size()); resize(desktop->screenGeometry(screen).size());
} }
} }

View File

@ -273,7 +273,7 @@ Containment* Corona::containmentForScreen(int screen) const
foreach (Containment* containment, d->containments) { foreach (Containment* containment, d->containments) {
if (containment->screen() == screen && if (containment->screen() == screen &&
(containment->containmentType() == Containment::DesktopContainment || (containment->containmentType() == Containment::DesktopContainment ||
containment->containmentType() == Containment::CustomContainment)) { containment->containmentType() >= Containment::CustomContainment)) {
return containment; return containment;
} }
} }