KDE/kdebase/workspace/plasma/desktop/containments/desktop
Marco Martin
notmart at gmail.com
Thu Jun 10 15:33:10 CEST 2010
SVN commit 1136696 by mart:
seems that adjustPhysicalPositions fails the first time is exacuted, but is not really clear why.
delaying it a second time fixes the issue, but doesn't seem a proper fix
BUG:241276
CCMAIL:ambrop7 at gmail.com
CCMAIL:plasma-devel at kde.org
M +8 -1 desktop.cpp
M +1 -0 desktop.h
--- trunk/KDE/kdebase/workspace/plasma/desktop/containments/desktop/desktop.cpp #1136695:1136696
@@ -102,15 +102,22 @@
}
}
+void DefaultDesktop::delayedPositionsAdjust()
+{
+ m_layout->adjustPhysicalPositions();
+}
+
void DefaultDesktop::onAppletTransformedByUser()
{
m_layout->itemTransformed((Applet *)sender(), DesktopLayout::ItemTransformUser);
+ QTimer::singleShot(1000, this, SLOT(delayedPositionsAdjust()));
m_layout->adjustPhysicalPositions();
}
void DefaultDesktop::onAppletTransformedItself()
{
m_layout->itemTransformed((Applet *)sender(), DesktopLayout::ItemTransformSelf);
+ QTimer::singleShot(1000, this, SLOT(delayedPositionsAdjust()));
m_layout->adjustPhysicalPositions();
}
@@ -124,7 +131,7 @@
}
QRectF workingGeom;
- if (screen() != -1 && screen() < c->numScreens()) {
+ if (1||(screen() != -1 && screen() < c->numScreens())) {
// we are associated with a screen, make sure not to overlap panels
workingGeom = c->availableScreenRegion(screen()).boundingRect();
//kDebug() << "got" << workingGeom;
--- trunk/KDE/kdebase/workspace/plasma/desktop/containments/desktop/desktop.h #1136695:1136696
@@ -69,6 +69,7 @@
void onAppletTransformedByUser();
void onAppletTransformedItself();
void refreshWorkingArea();
+ void delayedPositionsAdjust();
private:
DesktopLayout *m_layout;
More information about the Plasma-devel
mailing list