* 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
This commit is contained in:
Aaron J. Seigo 2007-11-26 23:28:03 +00:00
parent 44a7a86a6c
commit c3d71fb5f3

View File

@ -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;