diff options
-rw-r--r-- | src/plugins/platforms/blackberry/qbbintegration.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/blackberry/qbbscreen.cpp | 30 | ||||
-rw-r--r-- | src/plugins/platforms/blackberry/qbbscreen.h | 2 |
3 files changed, 34 insertions, 0 deletions
diff --git a/src/plugins/platforms/blackberry/qbbintegration.cpp b/src/plugins/platforms/blackberry/qbbintegration.cpp index 28484ba..6283bb1 100644 --- a/src/plugins/platforms/blackberry/qbbintegration.cpp +++ b/src/plugins/platforms/blackberry/qbbintegration.cpp @@ -349,6 +349,8 @@ void QBBIntegration::createDisplays() screen, SLOT(windowClosed(screen_window_t))); QObject::connect(mNavigatorEventHandler, SIGNAL(rotationChanged(int)), screen, SLOT(setRotation(int))); + QObject::connect(mNavigatorEventHandler, SIGNAL(windowGroupActivated(QByteArray)), screen, SLOT(activateWindowGroup(QByteArray))); + QObject::connect(mNavigatorEventHandler, SIGNAL(windowGroupDeactivated(QByteArray)), screen, SLOT(deactivateWindowGroup(QByteArray))); } } diff --git a/src/plugins/platforms/blackberry/qbbscreen.cpp b/src/plugins/platforms/blackberry/qbbscreen.cpp index 30630f1..206e307 100644 --- a/src/plugins/platforms/blackberry/qbbscreen.cpp +++ b/src/plugins/platforms/blackberry/qbbscreen.cpp @@ -351,4 +351,34 @@ void QBBScreen::removeOverlayWindow(screen_window_t window) updateHierarchy(); } +void QBBScreen::activateWindowGroup(const QByteArray &id) +{ +#if defined(QBBSCREEN_DEBUG) + qDebug() << Q_FUNC_INFO; +#endif + + if (!rootWindow() || id != rootWindow()->groupName()) + return; + + if (!mChildren.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. + QWidget * const window = mChildren.last()->widget(); + QWindowSystemInterface::handleWindowActivated(window); + } +} + +void QBBScreen::deactivateWindowGroup(const QByteArray &id) +{ +#if defined(QBBSCREEN_DEBUG) + qDebug() << Q_FUNC_INFO; +#endif + + if (!rootWindow() || id != rootWindow()->groupName()) + return; + + QWindowSystemInterface::handleWindowActivated(0); +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/blackberry/qbbscreen.h b/src/plugins/platforms/blackberry/qbbscreen.h index e353de1..3d67b69 100644 --- a/src/plugins/platforms/blackberry/qbbscreen.h +++ b/src/plugins/platforms/blackberry/qbbscreen.h @@ -88,6 +88,8 @@ public Q_SLOTS: void setRotation(int rotation); void newWindowCreated(screen_window_t window); void windowClosed(screen_window_t window); + void activateWindowGroup(const QByteArray &id); + void deactivateWindowGroup(const QByteArray &id); private Q_SLOTS: void keyboardHeightChanged(int height); |