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

List:       kde-bugs-dist
Subject:    [Bug 72276] desktop flickers when universal sidebar is
From:       Benoit Walter <b.walter () free ! fr>
Date:       2004-04-16 20:53:51
Message-ID: 20040416205351.28336.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
      
http://bugs.kde.org/show_bug.cgi?id=72276      
b.walter free fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From b.walter free fr  2004-04-16 22:53 -------
CVS commit by bwalter: 

Use setIconArea() instead of setMargins() to prevent wallpaper from
flickering. Repaint only when needed.

CCMAIL: 72276-done bugs kde org


  M +33 -15    kdiconview.cc   1.121


--- kdebase/kdesktop/kdiconview.cc  #1.120:1.121
 @ -1254,11 +1254,25  @ void KDIconView::updateWorkArea( const Q
 //    kdDebug(1204) << "KDIconView::updateWorkArea wr: " << wr.x() << "," << wr.y()
 //              << " " << wr.width() << "x" << wr.height() << endl;
-    setMargins( wr.left(), wr.top(),
+    QRect oldArea = iconArea();
+    setIconArea( wr );
+    /*setMargins( wr.left(), wr.top(),
                 QApplication::desktop()->width() - wr.right() - 1,
                 QApplication::desktop()->height() - wr.bottom() - 1 );
-    resizeContents( viewport()->width(), viewport()->height() );
-//    kdDebug(1204) << "resizeContents " << viewport()->width() << "x" << viewport()->height() << endl;
+    resizeContents( viewport()->width(), viewport()->height() );*/
 
-    for ( QIconViewItem *item = firstItem(); item; item = item->nextItem() ) {
+    if ( m_autoAlign )
+        lineupIcons();
+    else {
+        bool needRepaint = false;
+        QIconViewItem* item;
+        int dx, dy;
+        dx = wr.left() - oldArea.left();
+        dy = wr.top() - oldArea.top();
+        if ( dx != 0 || dy != 0 ) {
+            needRepaint = true;
+            for ( item = firstItem(); item; item = item->nextItem() )
+                item->moveBy( dx, dy );
+        }
+        for ( item = firstItem(); item; item = item->nextItem() ) {
         QRect r( item->rect() );
         int dx = 0, dy = 0;
 @ -1267,10 +1281,14  @ void KDIconView::updateWorkArea( const Q
         if ( r.right() > visibleWidth() )
             dx = visibleWidth() - r.right() - 1;
-        if ( dx != 0 || dy != 0 )
+            if ( dx != 0 || dy != 0 ) {
+                needRepaint = true;
             item->moveBy( dx, dy );
     }
-
+        }
+        if ( needRepaint ) {
     viewport()->repaint( FALSE );
     repaint( FALSE );
+        }
+    }
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

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