a bit of code detangling.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=828176
This commit is contained in:
parent
be453f062b
commit
b6393ba5a2
30
view.cpp
30
view.cpp
@ -175,33 +175,45 @@ void View::setContainment(Containment *containment)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int screen = -1;
|
|
||||||
Containment *oldContainment = d->containment;
|
|
||||||
|
|
||||||
if (d->containment) {
|
if (d->containment) {
|
||||||
disconnect(d->containment, SIGNAL(geometryChanged()), this, SLOT(updateSceneRect()));
|
disconnect(d->containment, SIGNAL(geometryChanged()), this, SLOT(updateSceneRect()));
|
||||||
screen = d->containment->screen();
|
|
||||||
//remove all the old containment's actions
|
|
||||||
d->containment->removeAssociatedWidget(this);
|
d->containment->removeAssociatedWidget(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
d->containment = containment;
|
|
||||||
if (!containment) {
|
if (!containment) {
|
||||||
|
d->containment = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Containment *oldContainment = d->containment;
|
||||||
|
|
||||||
|
int screen = -1;
|
||||||
|
if (oldContainment) {
|
||||||
|
screen = d->containment->screen();
|
||||||
|
}
|
||||||
|
|
||||||
|
d->containment = containment;
|
||||||
|
|
||||||
//add keyboard-shortcut actions
|
//add keyboard-shortcut actions
|
||||||
d->containment->addAssociatedWidget(this);
|
d->containment->addAssociatedWidget(this);
|
||||||
|
|
||||||
int otherScreen = containment->screen();
|
int otherScreen = containment->screen();
|
||||||
if (oldContainment && otherScreen > -1) {
|
|
||||||
oldContainment->setScreen(otherScreen);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (screen > -1) {
|
if (screen > -1) {
|
||||||
containment->setScreen(screen);
|
containment->setScreen(screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (oldContainment && otherScreen > -1) {
|
||||||
|
oldContainment->setScreen(otherScreen);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (oldContainment) {
|
||||||
|
kDebug() << (QObject*)oldContainment << screen << oldContainment->screen()
|
||||||
|
<< (QObject*)containment << otherScreen << containment->screen();
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (containment->screen() > -1 && d->desktop < -1) {
|
if (containment->screen() > -1 && d->desktop < -1) {
|
||||||
// we want to set it to "all desktops" if we get ownership of
|
// we want to set it to "all desktops" if we get ownership of
|
||||||
// a screen but don't have a desktop explicitly set
|
// a screen but don't have a desktop explicitly set
|
||||||
|
Loading…
x
Reference in New Issue
Block a user