keep screen assignments; this way if a screen is unplugged then comes back between plasma runs (e.g. log ins) we still have the containment kicking around. useful, that. ;)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=742136
This commit is contained in:
Aaron J. Seigo 2007-11-27 08:47:46 +00:00
parent fa2286925c
commit 20470c7c67

View File

@ -475,12 +475,12 @@ void Containment::setScreen(int screen)
kDebug() << "setting screen to" << screen << "and we are a" << containmentType();
QDesktopWidget *desktop = QApplication::desktop();
int numScreens = desktop->numScreens();
if (screen < -1 || screen > numScreens - 1) {
if (screen < -1) {
screen = -1;
}
//kDebug() << "setting screen to " << screen << "and type is" << containmentType();
if (screen > -1) {
if (screen < numScreens && screen > -1) {
QRect r = desktop->screenGeometry(screen);
if (containmentType() == DesktopContainment) {