diff options
author | Rafael Roquetto <rafael.roquetto.qnx@kdab.com> | 2013-02-25 19:45:02 -0300 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-28 19:22:05 +0100 |
commit | 439002cddeb32766ea9806ac8b5cf9a973ed0f13 (patch) | |
tree | 32f67bc3fa35e199b5e56883254560e2a998455c /src/plugins/platforms/qnx/qqnxscreen.cpp | |
parent | ab59a7ef09d56e59f9496ac59d88ba05db61e298 (diff) |
BlackBerry: handle window state navigator events
Change-Id: I925b1c53c5e251111469501056ee162a23e36faf
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxscreen.cpp')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxscreen.cpp | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp index fc8b3bb167..bd60c6b71d 100644 --- a/src/plugins/platforms/qnx/qqnxscreen.cpp +++ b/src/plugins/platforms/qnx/qqnxscreen.cpp @@ -551,6 +551,21 @@ void QQnxScreen::windowClosed(void *window) removeOverlayWindow(windowHandle); } +void QQnxScreen::windowGroupStateChanged(const QByteArray &id, Qt::WindowState state) +{ + qScreenDebug() << Q_FUNC_INFO; + + if (!rootWindow() || id != rootWindow()->groupName()) + return; + + QWindow * const window = topMostChildWindow(); + + if (!window) + return; + + QWindowSystemInterface::handleWindowStateChanged(window, state); +} + void QQnxScreen::activateWindowGroup(const QByteArray &id) { qScreenDebug() << Q_FUNC_INFO; @@ -558,13 +573,12 @@ void QQnxScreen::activateWindowGroup(const QByteArray &id) if (!rootWindow() || id != rootWindow()->groupName()) return; - if (!m_childWindows.isEmpty()) { - // We're picking up the last window of the list here - // because this list is ordered by stacking order. - // Last window is effectively the one on top. - QWindow * const window = m_childWindows.last()->window(); - QWindowSystemInterface::handleWindowActivated(window); - } + QWindow * const window = topMostChildWindow(); + + if (!window) + return; + + QWindowSystemInterface::handleWindowActivated(window); } void QQnxScreen::deactivateWindowGroup(const QByteArray &id) @@ -586,4 +600,17 @@ QSharedPointer<QQnxRootWindow> QQnxScreen::rootWindow() const return m_rootWindow; } +QWindow * QQnxScreen::topMostChildWindow() const +{ + if (!m_childWindows.isEmpty()) { + + // We're picking up the last window of the list here + // because this list is ordered by stacking order. + // Last window is effectively the one on top. + return m_childWindows.last()->window(); + } + + return 0; +} + QT_END_NAMESPACE |