Bug 94199 - show desktop button : option to automatically re-show windows on desktop icon launch
Summary: show desktop button : option to automatically re-show windows on desktop icon...
Status: RESOLVED FIXED
Alias: None
Product: kicker
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Aaron J. Seigo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-01 05:19 UTC by klee
Modified: 2004-12-01 06:11 UTC (History)
0 users

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 klee 2004-12-01 05:19:22 UTC
Version:            (using KDE KDE 3.3.1)
Installed from:    RedHat RPMs

I would like an option to have the "Show Desktop" button in kicker behave as it did before 3.2, i.e. launching something from the desktop automatically restores all hidden windows.

In my usual workflow, I hit "Show Desktop" in order to get temporarily access to some item on the desktop, and immediately hit it again afterwards to get my old windows again.

I notice that

Bug 79711: show desktop button with old functionnality

has been closed as WONTFIX, with a comment from aseigo indicating that the change was purposeful.  I believe Bug 79711 is subtly different: the poster was requesting that the "Show Desktop" button be returned to the old behavior by default, whereas I am requesting that there be a configuration option which toggles its behavior.
Comment 1 Aaron J. Seigo 2004-12-01 06:11:44 UTC
CVS commit by aseigo: 

if you have the desktop hidden, and a window gets shown, turn off desktop
hiding. this really does make more sense IMHO and requires neither a
revert to the old way nor a config option. hooray!
BUG:94199


  M +20 -0     showdesktop.cpp   1.6
  M +1 -0      showdesktop.h   1.4


--- kdebase/kicker/core/showdesktop.cpp  #1.5:1.6
@@ -45,4 +45,6 @@ ShowDesktop::ShowDesktop()
     connect( kWinModule, SIGNAL(currentDesktopChanged(int)),
              SLOT(slotCurrentDesktopChanged(int)));
+    connect( kWinModule, SIGNAL(windowAdded(WId)),
+             SLOT(slotWindowAdded(WId)));
     connect( kWinModule, SIGNAL(windowChanged(WId,unsigned int)),
              SLOT(slotWindowChanged(WId,unsigned int)));
@@ -54,4 +56,22 @@ void ShowDesktop::slotCurrentDesktopChan
 }
 
+void ShowDesktop::slotWindowAdded(WId w)
+{
+    if (!showingDesktop)
+    {
+        return;
+    }
+
+    NETWinInfo inf(qt_xdisplay(), w, qt_xrootwin(),
+                   NET::XAWMState | NET::WMWindowType);
+    NET::WindowType windowType = inf.windowType(NET::AllTypesMask);
+
+    if ((windowType == NET::Normal || windowType == NET::Unknown) &&
+        inf.mappingState() == NET::Visible)
+    {
+        showDesktop(false);
+    }
+}
+
 void ShowDesktop::slotWindowChanged(WId w, unsigned int dirty)
 {

--- kdebase/kicker/core/showdesktop.h  #1.3:1.4
@@ -47,4 +47,5 @@ signals:
 private slots:
     void slotCurrentDesktopChanged(int);
+    void slotWindowAdded(WId w);
     void slotWindowChanged(WId w, unsigned int dirty);