Summary: | show desktop button : option to automatically re-show windows on desktop icon launch | ||
---|---|---|---|
Product: | [Unmaintained] kicker | Reporter: | klee |
Component: | general | Assignee: | Aaron J. Seigo <aseigo> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | RedHat Enterprise Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
klee
2004-12-01 05:19:22 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); |