Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > a6bc312ce50b5c8d0c51736e58ac32bc > files > 99

kdebase-3.4.2-55mdk.src.rpm

--- kdebase-3.1/kicker/taskbar/taskbar.cpp--	2003-03-04 16:03:11.000000000 +0100
+++ kdebase-3.1/kicker/taskbar/taskbar.cpp	2003-03-04 16:03:46.000000000 +0100
@@ -104,7 +104,7 @@ QSize TaskBar::sizeHint() const
 
 QSize TaskBar::sizeHint( KPanelExtension::Position p, QSize maxSize) const
 {
-    if ( p == KPanelExtension::Left || p == KPanelExtension::Right ) 
+    if ( p == KPanelExtension::Left || p == KPanelExtension::Right )
     {
         int actualMax = BUTTON_HEIGHT * containerCount();
 
@@ -116,26 +116,26 @@ QSize TaskBar::sizeHint( KPanelExtension
         {
             return QSize( maxSize.width(), actualMax );
         }
-    } 
-    else 
+    }
+    else
     {
         int rows = contentsRect().height() / BUTTON_MIN_HEIGHT;
-        if ( rows < 1 ) 
+        if ( rows < 1 )
         {
             rows = 1;
         }
-        
+
         int actualMax = maxButtonWidth * (containerCount() / rows);
         if (containerCount() % rows > 0)
         {
             actualMax += maxButtonWidth;
         }
-        
-        if (actualMax > maxSize.width()) 
+
+        if (actualMax > maxSize.width())
         {
-           return maxSize; 
+           return maxSize;
         }
-        else 
+        else
         {
            return QSize( actualMax, maxSize.height() );
         }
@@ -389,7 +389,10 @@ void TaskBar::reLayout()
 {
     // filter task container list
     TaskContainerList list = filteredContainers();
-    if ( list.count() < 1 ) return;
+    if ( list.count() < 1 ) {
+        resizeContents( contentsRect().width(), contentsRect().height() );
+        return;
+    }
 
     if ( isGrouping != shouldGroup() ) {
         reGroup();
@@ -409,7 +412,7 @@ void TaskBar::reLayout()
 		{
 		    sorted.append( c );
 		    residue.remove( c );
-		}    
+		}
 	    }
 	}
 	list = sorted;
@@ -619,7 +622,7 @@ TaskContainerList TaskBar::filteredConta
     TaskContainerList list;
     for ( TaskContainerIterator it(containers); it.current(); ++it ) {
 	TaskContainer* c = it.current();
-	if ( (showAllWindows || c->onCurrentDesktop()) 
+	if ( (showAllWindows || c->onCurrentDesktop())
 	  && (!showOnlyIconified || c->isIconified()) ) {
 	    list.append( c );
 	    c->show();