save the desktop setting when it changes in setScreen just as we do for the screen
CCBUG:192245 svn path=/trunk/KDE/kdelibs/; revision=976441
This commit is contained in:
parent
0f8a89e2d4
commit
d5ce775e22
@ -295,6 +295,7 @@ void Containment::restore(KConfigGroup &group)
|
|||||||
|
|
||||||
setLocation((Plasma::Location)group.readEntry("location", (int)d->location));
|
setLocation((Plasma::Location)group.readEntry("location", (int)d->location));
|
||||||
setFormFactor((Plasma::FormFactor)group.readEntry("formfactor", (int)d->formFactor));
|
setFormFactor((Plasma::FormFactor)group.readEntry("formfactor", (int)d->formFactor));
|
||||||
|
//kDebug() << "setScreen from restore";
|
||||||
setScreen(group.readEntry("screen", d->screen), group.readEntry("desktop", d->desktop));
|
setScreen(group.readEntry("screen", d->screen), group.readEntry("desktop", d->desktop));
|
||||||
setActivity(group.readEntry("activity", QString()));
|
setActivity(group.readEntry("activity", QString()));
|
||||||
|
|
||||||
@ -843,7 +844,7 @@ void Containment::setScreen(int newScreen, int newDesktop)
|
|||||||
newDesktop = -1;
|
newDesktop = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
kDebug() << activity() << "setting screen to " << newScreen << newDesktop << "and type is" << d->type;
|
//kDebug() << activity() << "setting screen to " << newScreen << newDesktop << "and type is" << d->type;
|
||||||
|
|
||||||
Containment *swapScreensWith(0);
|
Containment *swapScreensWith(0);
|
||||||
if (d->type == DesktopContainment || d->type >= CustomContainment) {
|
if (d->type == DesktopContainment || d->type >= CustomContainment) {
|
||||||
@ -862,6 +863,7 @@ void Containment::setScreen(int newScreen, int newDesktop)
|
|||||||
<< "desktop" << currently->desktop()
|
<< "desktop" << currently->desktop()
|
||||||
<< "and is" << currently->activity()
|
<< "and is" << currently->activity()
|
||||||
<< (QObject*)currently << "i'm" << (QObject*)this;
|
<< (QObject*)currently << "i'm" << (QObject*)this;
|
||||||
|
//kDebug() << "setScreen due to swap";
|
||||||
currently->setScreen(-1, newDesktop);
|
currently->setScreen(-1, newDesktop);
|
||||||
swapScreensWith = currently;
|
swapScreensWith = currently;
|
||||||
}
|
}
|
||||||
@ -883,15 +885,19 @@ void Containment::setScreen(int newScreen, int newDesktop)
|
|||||||
|
|
||||||
updateConstraints(Plasma::ScreenConstraint);
|
updateConstraints(Plasma::ScreenConstraint);
|
||||||
|
|
||||||
if (oldScreen != newScreen) {
|
if (oldScreen != newScreen || oldDesktop != newDesktop) {
|
||||||
emit screenChanged(oldScreen, newScreen, this);
|
if (oldScreen != newScreen) {
|
||||||
|
emit screenChanged(oldScreen, newScreen, this);
|
||||||
|
}
|
||||||
|
|
||||||
KConfigGroup c = config();
|
KConfigGroup c = config();
|
||||||
c.writeEntry("screen", d->screen);
|
c.writeEntry("screen", d->screen);
|
||||||
|
c.writeEntry("desktop", d->desktop);
|
||||||
emit configNeedsSaving();
|
emit configNeedsSaving();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (swapScreensWith) {
|
if (swapScreensWith) {
|
||||||
|
//kDebug() << "setScreen due to swap, part 2";
|
||||||
swapScreensWith->setScreen(oldScreen, oldDesktop);
|
swapScreensWith->setScreen(oldScreen, oldDesktop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user