[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/desktop/containments/desktop
From:       Marco Martin <notmart () gmail ! com>
Date:       2010-06-10 13:33:10
Message-ID: 20100610133310.90A3CAC8D1 () svn ! kde ! org
[Download RAW message or body]

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@gmail.com
CCMAIL:plasma-devel@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;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic