summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer.qnx@kdab.com>2012-05-18 11:13:03 +0100
committerQt by Nokia <qt-info@nokia.com>2012-05-19 01:45:04 +0200
commitb09d601261244395450557187adeed6717f25155 (patch)
treec1ddc9ed14ef94921cceda9640e1427b9873acbf
parent55d7e5f18bb321981edef0cb02fdad5b5ad0bd0a (diff)
QNX: Special case z-ordering of the QDesktopWidget window
The assumption that window creation order implies correct initial z-ordering is broken when dealing with certain window types. In this commit we special case the QDesktopWidget's window which maybe created after normal application windows yet still need to be layered below them. Without this fix we may accidentaly activate the Desktop window when the blackberry navigator service sends an event to activate the window group. That results in broken focus handling. Change-Id: I42dfde2efb4a0011e37e7bd2e7c5442590606a24 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp
index 25a1204b6f..ac0d552d90 100644
--- a/src/plugins/platforms/qnx/qqnxscreen.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreen.cpp
@@ -210,7 +210,17 @@ void QQnxScreen::addWindow(QQnxWindow *window)
if (m_childWindows.contains(window))
return;
- m_childWindows.push_back(window);
+ // Ensure that the desktop window is at the bottom of the zorder.
+ // If we do not do this then we may end up activating the desktop
+ // when the navigator service gets an event that our window group
+ // has been activated (see QQnxScreen::activateWindowGroup()).
+ // Such a situation would strangely break focus handling due to the
+ // invisible desktop widget window being layered on top of normal
+ // windows
+ if (window->window()->windowType() == Qt::Desktop)
+ m_childWindows.push_front(window);
+ else
+ m_childWindows.push_back(window);
updateHierarchy();
}