if we are switching two containments in Containment::setScreen()

let's before emit a screenchanged with -1 as the new screen for both.
this will make the views forget about them and they won't try to swao them again
makes possible to switch containments on multimonitor or pervirtualdesktopviews=true


svn path=/trunk/KDE/kdelibs/; revision=1063989
This commit is contained in:
Marco Martin 2009-12-19 18:48:56 +00:00
parent 7732b62f16
commit d16be0c15a

View File

@ -1028,7 +1028,10 @@ void Containment::setScreen(int newScreen, int newDesktop)
<< "and is" << currently->activity()
<< (QObject*)currently << "i'm" << (QObject*)this;
//kDebug() << "setScreen due to swap";
//make the view completely forget about us
emit screenChanged(d->screen, -1, this);
currently->setScreen(-1, newDesktop);
emit screenChanged(-1, newDesktop, currently);
swapScreensWith = currently;
}
}
@ -1050,9 +1053,7 @@ void Containment::setScreen(int newScreen, int newDesktop)
updateConstraints(Plasma::ScreenConstraint);
if (oldScreen != newScreen || oldDesktop != newDesktop) {
if (oldScreen != newScreen) {
emit screenChanged(oldScreen, newScreen, this);
}
emit screenChanged(oldScreen, newScreen, this);
KConfigGroup c = config();
c.writeEntry("screen", d->screen);