summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKimmo Hämäläinen <kimmo.hamalainen@nokia.com>2010-12-07 18:16:13 +0200
committerAdam Endrodi <ext-adam.endrodi@nokia.com>2010-12-14 13:31:51 +0200
commit0064f3f3e29c409f49ab049e4de1f76dfa667d32 (patch)
treebfed137e9c017492ec2261c6535542468740c71c
parent8c71bda3c1b57f6c2cde2297c09b2469dca1e4ee (diff)
Improve fix for NB#202667 - Search application launches automatically
- the code did not handle case when we have normal application window as well as always-mapped windows mapped before the desktop window is mapped
-rw-r--r--src/mcompositemanager.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mcompositemanager.cpp b/src/mcompositemanager.cpp
index a027cba..5f65cd6 100644
--- a/src/mcompositemanager.cpp
+++ b/src/mcompositemanager.cpp
@@ -2410,9 +2410,21 @@ stack_and_return:
if (pc->windowState() == NormalState &&
(stack[DESKTOP_LAYER] != win || !getTopmostApp(0, win, true)))
activateWindow(win, CurrentTime, false);
- else
+ else {
// desktop is stacked below the active application
positionWindow(win, false);
+ if (win == stack[DESKTOP_LAYER]) {
+ // lower always mapped windows below the desktop
+ for (QHash<Window, MCompositeWindow *>::iterator it = windows.begin();
+ it != windows.end(); ++it) {
+ MCompositeWindow *i = it.value();
+ if (i->propertyCache() && i->propertyCache()->isMapped()
+ && i->propertyCache()->alwaysMapped() > 0)
+ setWindowState(i->window(), IconicState);
+ }
+ roughSort();
+ }
+ }
dirtyStacking(false);
}