summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxscreen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxscreen.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.cpp41
1 files changed, 34 insertions, 7 deletions
diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp
index dfd7ccf0cc..f9efbde40c 100644
--- a/src/plugins/platforms/qnx/qqnxscreen.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreen.cpp
@@ -553,6 +553,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 +575,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 +602,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