diff options
author | Sean Harmer <sean.harmer.qnx@kdab.com> | 2012-05-21 09:14:25 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-21 10:59:03 (GMT) |
commit | 2a296280f609c60639061ce37369c48d0d65fbe0 (patch) | |
tree | 385467287adb6f1dd8668b9c615a1496217b9992 | |
parent | fe2d1518146242532d76f5ee353ab45a4aed29d2 (diff) | |
download | Qt-2a296280f609c60639061ce37369c48d0d65fbe0.zip Qt-2a296280f609c60639061ce37369c48d0d65fbe0.tar.gz Qt-2a296280f609c60639061ce37369c48d0d65fbe0.tar.bz2 |
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.
Backport of b09d601261244395450557187adeed6717f25155 (qtbase)
Change-Id: If7c4b1ac9d99dc5a9b7d0e7b3e2080c648cf85b3
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-rw-r--r-- | src/plugins/platforms/blackberry/qbbscreen.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/platforms/blackberry/qbbscreen.cpp b/src/plugins/platforms/blackberry/qbbscreen.cpp index 206e307..2902f7e 100644 --- a/src/plugins/platforms/blackberry/qbbscreen.cpp +++ b/src/plugins/platforms/blackberry/qbbscreen.cpp @@ -251,7 +251,17 @@ void QBBScreen::addWindow(QBBWindow* window) if (mChildren.contains(window)) return; - mChildren.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 QBBScreen::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->widget()->windowType() == Qt::Desktop) + mChildren.push_front(window); + else + mChildren.push_back(window); updateHierarchy(); } |