From c3d71fb5f3b0008c75379be1992f586e942a121a Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Mon, 26 Nov 2007 23:28:03 +0000 Subject: [PATCH] * don't assume a screen; this prevents containments without a screen expressley set from taking over the primary desktop; at least i know that screen take over works though ;) * only bother with screent take over is we have an actual screen (e.g. something > -1) svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=742029 --- containment.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/containment.cpp b/containment.cpp index 6657d2b4c..9b44fa2c4 100644 --- a/containment.cpp +++ b/containment.cpp @@ -57,7 +57,7 @@ public: Private() : formFactor(Planar), location(Floating), - screen(0), + screen(-1), immutable(false), toolbox(0) { @@ -450,7 +450,7 @@ void Containment::setScreen(int screen) { // screen of -1 means no associated screen. // sanity check to make sure someone else doesn't have this screen already! - if (containmentType() == DesktopContainment && corona()) { + if (screen > -1 && containmentType() == DesktopContainment && corona()) { Containment* currently = corona()->containmentForScreen(screen); if (currently && currently != this) { //kDebug() << "currently is on screen" << currently->screen() << "and is" << currently->name() << (QObject*)currently << (QObject*)this;