diff options
author | Kimmo Hämäläinen <kimmo.hamalainen@nokia.com> | 2010-11-29 15:52:18 +0200 |
---|---|---|
committer | Adam Endrodi <ext-adam.endrodi@nokia.com> | 2010-12-03 11:16:05 +0200 |
commit | 688b377f423629e18225280de3b8ed0759330fe1 (patch) | |
tree | 99edcbf3628f04ef0c3ea305734f739a72c65584 | |
parent | 144edd63948e441a2bc17d71059dafae8976932a (diff) |
Fixes: NB#206347 - Status indicator menu is opened on top of home, not the topmost application
- don't accept menus as the current application
-rw-r--r-- | src/mcompositemanager.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mcompositemanager.cpp b/src/mcompositemanager.cpp index 6fc1755..61fbeee 100644 --- a/src/mcompositemanager.cpp +++ b/src/mcompositemanager.cpp @@ -1036,7 +1036,8 @@ Window MCompositeManagerPrivate::getTopmostApp(int *index_in_stacking_list, GTA(" has _MEEGOTOUCH_ALWAYS_MAPPED"); continue; } - // NOTE: this WILL pass transient application window (this is intended!) + // NOTE: this WILL pass transient application window and non-transient + // menu (this is intended!) if ((pc->windowTypeAtom() == ATOM(_NET_WM_WINDOW_TYPE_MENU) && getLastVisibleParent(pc)) || (pc->windowTypeAtom() != ATOM(_NET_WM_WINDOW_TYPE_MENU) @@ -2017,13 +2018,17 @@ void MCompositeManagerPrivate::checkStacking(bool force_visibility_check, for (int i = stacking_list.size() - 1; i >= 0; --i) { MCompositeWindow *cw; Window w = stacking_list.at(i); - if (w == stack[DESKTOP_LAYER]) + if (w == stack[DESKTOP_LAYER]) { + set_as_current_app = w; break; + } if (!(cw = COMPOSITE_WINDOW(w))) continue; - if (cw->isMapped() && cw->isAppWindow(true)) { + if (cw->propertyCache() && cw->isMapped() && cw->isAppWindow(true)) { topmost = cw; top_i = i; + // topmost does not include menus, better suited as current app + set_as_current_app = topmost->propertyCache()->winId(); break; } } |