summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKimmo Hämäläinen <kimmo.hamalainen@nokia.com>2010-11-19 16:50:47 +0200
committerAdam Endrodi <ext-adam.endrodi@nokia.com>2010-12-02 17:51:14 +0200
commit9a377088d55aa53923dc419feffdf69a5049117f (patch)
tree35e39c4acad79ae55c052e09a1be694c69e52367
parent92849b59f9d1a600a95f2a6987b4aa310a5804a1 (diff)
more fixes for NB#202713 + fix status menu stacking issue
- redirection of windows now happens before the overlay changes
-rw-r--r--src/mcompositemanager.cpp28
-rw-r--r--src/mcompositemanager_p.h2
2 files changed, 15 insertions, 15 deletions
diff --git a/src/mcompositemanager.cpp b/src/mcompositemanager.cpp
index b9490b4..d14c9c6 100644
--- a/src/mcompositemanager.cpp
+++ b/src/mcompositemanager.cpp
@@ -1033,15 +1033,13 @@ Window MCompositeManagerPrivate::getTopmostApp(int *index_in_stacking_list,
GTA(" has _MEEGOTOUCH_ALWAYS_MAPPED");
continue;
}
- if (!cw->isAppWindow(true)) {
- /* Non-transient TYPE_MENU on the same stacking layer? */
- if (getLastVisibleParent(pc)) {
- GTA(" has last visible parent");
- continue;
- } else if (pc->windowTypeAtom() != ATOM(_NET_WM_WINDOW_TYPE_MENU)) {
- GTA(" not a menu");
- continue;
- }
+ // NOTE: this WILL pass transient application window (this is intended!)
+ if ((pc->windowTypeAtom() == ATOM(_NET_WM_WINDOW_TYPE_MENU)
+ && getLastVisibleParent(pc))
+ || (pc->windowTypeAtom() != ATOM(_NET_WM_WINDOW_TYPE_MENU)
+ && !cw->isAppWindow(true))) {
+ GTA(" not an application window (or non-transient menu)");
+ continue;
}
if (pc->windowState() != NormalState) {
GTA(" not in normal state");
@@ -3368,7 +3366,7 @@ void MCompositeManagerPrivate::enableCompositing(bool forced)
if (!overlay_mapped)
showOverlayWindow(true);
else
- enableRedirection();
+ enableRedirection(true);
}
void MCompositeManagerPrivate::showOverlayWindow(bool show)
@@ -3390,6 +3388,7 @@ void MCompositeManagerPrivate::showOverlayWindow(bool show)
ShapeSet, Unsorted);
overlay_mapped = false;
} else if (show && (!overlay_mapped || first_call)) {
+ enableRedirection(false);
XShapeCombineRectangles(QX11Info::display(), xoverlay,
ShapeBounding, 0, 0, &fs, 1,
ShapeSet, Unsorted);
@@ -3403,12 +3402,12 @@ void MCompositeManagerPrivate::showOverlayWindow(bool show)
ShapeInput, 0, 0, r);
XFixesDestroyRegion(QX11Info::display(), r);
overlay_mapped = true;
- enableRedirection();
+ emit compositingEnabled();
}
first_call = false;
}
-void MCompositeManagerPrivate::enableRedirection()
+void MCompositeManagerPrivate::enableRedirection(bool emit_signal)
{
for (QHash<Window, MCompositeWindow *>::iterator it = windows.begin();
it != windows.end(); ++it) {
@@ -3423,8 +3422,9 @@ void MCompositeManagerPrivate::enableRedirection()
// no delay: application does not need to redraw when maximizing it
scene()->views()[0]->setUpdatesEnabled(true);
// NOTE: enableRedirectedRendering() calls glwidget->update() if needed
- // At this point everything should be rendered off-screen
- emit compositingEnabled();
+ if (emit_signal)
+ // At this point everything should be rendered off-screen
+ emit compositingEnabled();
}
void MCompositeManagerPrivate::disableCompositing(ForcingLevel forced)
diff --git a/src/mcompositemanager_p.h b/src/mcompositemanager_p.h
index 716c5c6..330dd3b 100644
--- a/src/mcompositemanager_p.h
+++ b/src/mcompositemanager_p.h
@@ -95,7 +95,7 @@ public:
void redirectWindows();
void showOverlayWindow(bool show);
- void enableRedirection();
+ void enableRedirection(bool emit_signal);
void setExposeDesktop(bool exposed);
void checkStacking(bool force_visibility_check,
Time timestamp = CurrentTime);