Bug 72276 - desktop flickers when universal sidebar is openend/closed
Summary: desktop flickers when universal sidebar is openend/closed
Status: CLOSED FIXED
Alias: None
Product: kdesktop
Classification: Miscellaneous
Component: icons (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-10 00:19 UTC by Jay
Modified: 2009-01-02 20:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jay 2004-01-10 00:19:07 UTC
Version:           v1.9.8 (using KDE 3.1.94 (CVS >= 20031206), Gentoo)
Compiler:          gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice)
OS:          Linux (i686) release 2.6.0

Universal sidebar on the right, when I expand it or close it desktop icons flicker.
Comment 1 Benoit Walter 2004-04-16 22:53:47 UTC
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 );
+        }
+    }
 }
 


Comment 2 Gustavo Sverzut Barbieri 2004-05-24 05:39:55 UTC
Is that in 3.2.2? I still notice the flickering.
Comment 3 FiNeX 2009-01-02 20:26:44 UTC
Bug closed. Kdesktop is no more mantained.