From f63f585f1a2d7a31aa72443a658c4567a7a9b559 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Tue, 27 Nov 2007 09:06:52 +0000 Subject: [PATCH] take into consideration the appearance of new screens between plasma runs. thanks to Frederic Marmond for testing these situations svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=742145 --- corona.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/corona.cpp b/corona.cpp index f77a8eb3d..bfdb1874a 100644 --- a/corona.cpp +++ b/corona.cpp @@ -199,6 +199,17 @@ void Corona::loadApplets(const QString& configName) if (d->containments.count() < 1) { loadDefaultSetup(); } else { + // quick sanity check to ensure we have containments for each screen! + int numScreens = QApplication::desktop()->numScreens(); + for (int i = 0; i < numScreens; ++i) { + if (!containmentForScreen(i)) { + //TODO: should we look for containments that aren't asigned but already exist? + Containment* c = addContainment("desktop"); + c->setScreen(i); + c->setFormFactor(Plasma::Planar); + } + } + foreach (Containment* containment, d->containments) { QString cid = QString::number(containment->id()); containment->init();