diff options
4 files changed, 46 insertions, 0 deletions
diff --git a/src/plugins/platforms/blackberry/qbbbpseventfilter.cpp b/src/plugins/platforms/blackberry/qbbbpseventfilter.cpp index 79a48f6..a9e8523 100644 --- a/src/plugins/platforms/blackberry/qbbbpseventfilter.cpp +++ b/src/plugins/platforms/blackberry/qbbbpseventfilter.cpp @@ -190,6 +190,26 @@ bool QBBBpsEventFilter::handleNavigatorEvent(bps_event_t *event) mNavigatorEventHandler->handleExit(); break; + case NAVIGATOR_WINDOW_ACTIVE: { + #if defined(QBBBPSEVENTFILTER_DEBUG) + qDebug() << "QBB: Navigator WINDOW ACTIVE event"; + #endif + + const QByteArray id(navigator_event_get_groupid(event)); + mNavigatorEventHandler->handleWindowGroupActivated(id); + break; + } + + case NAVIGATOR_WINDOW_INACTIVE: { + #if defined(QBBBPSEVENTFILTER_DEBUG) + qDebug() << "QBB: Navigator WINDOW INACTIVE event"; + #endif + + const QByteArray id(navigator_event_get_groupid(event)); + mNavigatorEventHandler->handleWindowGroupDeactivated(id); + break; + } + default: #if defined(QBBBPSEVENTFILTER_DEBUG) qDebug() << "QBB: Unhandled navigator event. code=" << bps_event_get_code(event); diff --git a/src/plugins/platforms/blackberry/qbbnavigatoreventhandler.cpp b/src/plugins/platforms/blackberry/qbbnavigatoreventhandler.cpp index 4f740b3..449bf84 100644 --- a/src/plugins/platforms/blackberry/qbbnavigatoreventhandler.cpp +++ b/src/plugins/platforms/blackberry/qbbnavigatoreventhandler.cpp @@ -98,4 +98,22 @@ void QBBNavigatorEventHandler::handleExit() QApplication::quit(); } +void QBBNavigatorEventHandler::handleWindowGroupActivated(const QByteArray &id) +{ +#if defined(QBBNAVIGATOREVENTHANDLER_DEBUG) + qDebug() << Q_FUNC_INFO << id; +#endif + + Q_EMIT windowGroupActivated(id); +} + +void QBBNavigatorEventHandler::handleWindowGroupDeactivated(const QByteArray &id) +{ +#if defined(QBBNAVIGATOREVENTHANDLER_DEBUG) + qDebug() << Q_FUNC_INFO << id; +#endif + + Q_EMIT windowGroupDeactivated(id); +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/blackberry/qbbnavigatoreventhandler.h b/src/plugins/platforms/blackberry/qbbnavigatoreventhandler.h index b2f6eda..a0b3622 100644 --- a/src/plugins/platforms/blackberry/qbbnavigatoreventhandler.h +++ b/src/plugins/platforms/blackberry/qbbnavigatoreventhandler.h @@ -54,9 +54,13 @@ public: void handleOrientationChange(int angle); void handleSwipeDown(); void handleExit(); + void handleWindowGroupActivated(const QByteArray &id); + void handleWindowGroupDeactivated(const QByteArray &id); Q_SIGNALS: void rotationChanged(int angle); + void windowGroupActivated(const QByteArray &id); + void windowGroupDeactivated(const QByteArray &id); }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/blackberry/qbbnavigatoreventnotifier.cpp b/src/plugins/platforms/blackberry/qbbnavigatoreventnotifier.cpp index 1516c5b..63ae8fb 100644 --- a/src/plugins/platforms/blackberry/qbbnavigatoreventnotifier.cpp +++ b/src/plugins/platforms/blackberry/qbbnavigatoreventnotifier.cpp @@ -192,6 +192,10 @@ void QBBNavigatorEventNotifier::handleMessage(const QByteArray &msg, const QByte mEventHandler->handleSwipeDown(); } else if (msg == "exit") { mEventHandler->handleExit(); + } else if (msg == "windowActive") { + mEventHandler->handleWindowGroupActivated(dat); + } else if (msg == "windowInactive") { + mEventHandler->handleWindowGroupDeactivated(dat); } } |