diff options
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxscreen.cpp')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxscreen.cpp | 46 |
1 files changed, 39 insertions, 7 deletions
diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp index dfd7ccf0cc..3e79ca7f1d 100644 --- a/src/plugins/platforms/qnx/qqnxscreen.cpp +++ b/src/plugins/platforms/qnx/qqnxscreen.cpp @@ -503,6 +503,11 @@ QPlatformCursor * QQnxScreen::cursor() const return m_cursor; } +QPlatformCursor * QQnxScreen::cursor() const +{ + return m_cursor; +} + void QQnxScreen::keyboardHeightChanged(int height) { if (height == m_keyboardHeight) @@ -553,6 +558,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; @@ -560,13 +580,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) @@ -588,4 +607,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 |