don't lose the desktop in the process of swaping contaiment assignments; include desktop assignment in the debug
CCBUG:175697 svn path=/trunk/KDE/kdelibs/; revision=913049
This commit is contained in:
parent
88abeaf783
commit
5e41fb8132
@ -813,13 +813,13 @@ void Containment::setScreen(int screen, int desktop)
|
|||||||
kDebug() << "currently is on screen" << currently->screen()
|
kDebug() << "currently is on screen" << currently->screen()
|
||||||
<< "and is" << currently->name()
|
<< "and is" << currently->name()
|
||||||
<< (QObject*)currently << (QObject*)this;
|
<< (QObject*)currently << (QObject*)this;
|
||||||
currently->setScreen(-1);
|
currently->setScreen(-1, desktop);
|
||||||
swapScreensWith = currently;
|
swapScreensWith = currently;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kDebug() << "setting screen to" << screen << "and we are a" << containmentType();
|
kDebug() << "setting screen to" << screen << desktop << "and we are a" << containmentType();
|
||||||
Q_ASSERT(corona());
|
Q_ASSERT(corona());
|
||||||
int numScreens = corona()->numScreens();
|
int numScreens = corona()->numScreens();
|
||||||
if (screen < -1) {
|
if (screen < -1) {
|
||||||
@ -827,7 +827,7 @@ void Containment::setScreen(int screen, int desktop)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
kDebug() << "setting screen to " << screen << "and type is" << containmentType();
|
kDebug() << "setting screen to " << screen << desktop << "and type is" << containmentType();
|
||||||
if (screen < numScreens && screen > -1) {
|
if (screen < numScreens && screen > -1) {
|
||||||
if (containmentType() == DesktopContainment ||
|
if (containmentType() == DesktopContainment ||
|
||||||
containmentType() >= CustomContainment) {
|
containmentType() >= CustomContainment) {
|
||||||
@ -840,6 +840,7 @@ void Containment::setScreen(int screen, int desktop)
|
|||||||
desktop = -1;
|
desktop = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int oldDesktop = d->desktop;
|
||||||
d->desktop = desktop;
|
d->desktop = desktop;
|
||||||
|
|
||||||
int oldScreen = d->screen;
|
int oldScreen = d->screen;
|
||||||
@ -854,7 +855,7 @@ void Containment::setScreen(int screen, int desktop)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (swapScreensWith) {
|
if (swapScreensWith) {
|
||||||
swapScreensWith->setScreen(oldScreen);
|
swapScreensWith->setScreen(oldScreen, oldDesktop);
|
||||||
}
|
}
|
||||||
|
|
||||||
d->checkRemoveAction();
|
d->checkRemoveAction();
|
||||||
|
Loading…
Reference in New Issue
Block a user