From 20470c7c675866b47c97015a8e093c1881e5b3e6 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Tue, 27 Nov 2007 08:47:46 +0000 Subject: [PATCH] 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 --- containment.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/containment.cpp b/containment.cpp index a235356a0..bd06f4afa 100644 --- a/containment.cpp +++ b/containment.cpp @@ -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) {