Bug 113552

Summary: Clicking on "Show desktop" and then "Configure desktop..." causes unminimizing all windows
Product: [Plasma] kwin Reporter: Krzysztof Lichota <krzysiek>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: instezz, mail, vekee
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Krzysztof Lichota 2005-09-29 10:42:53 UTC
Version:            (using KDE KDE 3.4.90)
Installed from:    SuSE RPMs

When clicking "Show desktop" to minimize windows and later "Configure desktop...", all windows are suddenly unminimized.
It does not occur if windows are not minimized using "Show desktop", possibly some toggle-action is used.

Steps to reproduce:
1. Open some maximized windows.
2. Click button "Show desktop" - windows are minimized and desktop is shown.
3. Right-click desktop and select "Configure desktop...".
4. Windows which were minimized by "Show desktop" (but seems that only these) are unminimized. It is very irritating.

Expected behaviour would be to leave windows in their state.
Comment 1 András Manţia 2005-10-01 09:07:02 UTC
SVN commit 465900 by amantia:

Be consistent and don't use animation in any case when a bunch of minimized windows (with Show Desktop) are restored.
But I don't really understand why they should be restored when you invoke Configure Desktop...

CCBUG: 110794
CCBUG: 113552

 M  +1 -1      workspace.cpp  


--- branches/KDE/3.5/kdebase/kwin/workspace.cpp #465899:465900
@@ -2562,7 +2562,7 @@
         for( ClientList::ConstIterator it = showing_desktop_clients.begin();
              it != showing_desktop_clients.end();
              ++it )
-            (*it)->unminimize();
+            (*it)->unminimize(true);
         }
     showing_desktop_clients.clear();
     --block_showing_desktop;
Comment 2 Peter Thomassen 2005-10-18 20:24:34 UTC
The same behavior occurs after pressing [Del] on a desktop icon so that the alert window appears.

I am using KDE 3.5 beta2 and this patch seems to have made it in, since unminimizing is much faster than in beta1.

Nevertheless, we necessarily have to fix this for 3.5, this in unacceptable. Is anyone able to explain why windows are unminimized at all?
Comment 3 Krzysztof Lichota 2005-10-23 23:03:39 UTC
In KDE 3.5 beta2 still happens (though unminimizing is instant). 
I have also noticed it happens when minimizing all windows, then trying to run application shortcut from the desktop.
Comment 4 Krzysztof Lichota 2005-11-15 00:21:16 UTC
Still present in KDE 3.5 RC1.
Comment 5 Steffen Schoenwiese 2005-11-20 20:07:31 UTC
Have a look at Bug 94199 and Bug 108899. I think this behaviour is intended. I would like the other behaviour better too, but maybe we are outnumbered ;-)
Comment 6 Mohd Asif Ali Rizwaan 2005-12-07 23:40:36 UTC
also, rmb->run command from desktop's rmb menu causes this bug. this bug still present in KDE 3.5.0. this is an annoying small bug :(
Comment 7 Lubos Lunak 2006-03-17 17:04:54 UTC
*** Bug 123668 has been marked as a duplicate of this bug. ***
Comment 8 Lubos Lunak 2006-04-10 21:59:34 UTC
*** Bug 125286 has been marked as a duplicate of this bug. ***
Comment 9 Lubos Lunak 2006-04-11 00:10:53 UTC
SVN commit 528391 by lunakl:

Don't deactivate the showing desktop state when a new window is shown
that belongs to the desktop.
BUG: 113552



 M  +10 -1     client.cpp  
 M  +10 -1     manage.cpp  


--- branches/KDE/3.5/kdebase/kwin/client.cpp #528390:528391
@@ -895,7 +895,16 @@
         }
     if( show )
         {
-        if( workspace()->showingDesktop())
+        bool belongs_to_desktop = false;
+        for( ClientList::ConstIterator it = group()->members().begin();
+             it != group()->members().end();
+             ++it )
+            if( (*it)->isDesktop())
+                {
+                belongs_to_desktop = true;
+                break;
+                }
+        if( !belongs_to_desktop && workspace()->showingDesktop())
             workspace()->resetShowingDesktop( true );
         if( isShade())
             setMappingState( IconicState );
--- branches/KDE/3.5/kdebase/kwin/manage.cpp #528390:528391
@@ -455,7 +455,16 @@
         if( !isOnCurrentDesktop() && !isMapped && !session && ( allow || workspace()->sessionSaving()))
             workspace()->setCurrentDesktop( desktop());
 
-        if( workspace()->showingDesktop())
+        bool belongs_to_desktop = false;
+        for( ClientList::ConstIterator it = group()->members().begin();
+             it != group()->members().end();
+             ++it )
+            if( (*it)->isDesktop())
+                {
+                belongs_to_desktop = true;
+                break;
+                }
+        if( !belongs_to_desktop && workspace()->showingDesktop())
             workspace()->resetShowingDesktop( false );
 
         if( isOnCurrentDesktop() && !isMapped && !allow )
Comment 10 Peter Thomassen 2006-04-11 01:42:00 UTC
So, contrary to comment #5, the former behaviour is no longer intended?