From abae4e913e91e64153edcc8cb771393062432ea2 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 22 Oct 2009 14:59:56 +0300 Subject: Lowering toplevel widget puts app to background. Since raising toplevel widget nowdays brings the whole app to top, logically lowering toplevel widget should put the app to background. Reviewed-by: axis --- src/gui/kernel/qwidget_s60.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index abf5ba5..cb615fe 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -564,8 +564,13 @@ void QWidgetPrivate::lower_sys() Q_Q(QWidget); Q_ASSERT(q->testAttribute(Qt::WA_WState_Created)); - if (q->internalWinId()) - q->internalWinId()->DrawableWindow()->SetOrdinalPosition(-1); + if (q->internalWinId()) { + // If toplevel widget, lower app to background + if (q->isWindow()) + S60->wsSession().SetWindowGroupOrdinalPosition(S60->windowGroup().Identifier(), -1); + else + q->internalWinId()->DrawableWindow()->SetOrdinalPosition(-1); + } if (!q->isWindow()) invalidateBuffer(q->rect()); -- cgit v0.12