QNX: Use window group of top-level window for mmr

Pass the top-level window's window group to mm-renderer,
as required by mmr.

Change-Id: I2a2e8b4aa48f5c2292b03593c6d528068f383b5c
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
This commit is contained in:
Frank Osterfeld
2013-11-28 17:06:17 +01:00
committed by The Qt Project
parent 13882cd5da
commit 01f8ff3834

View File

@@ -207,10 +207,18 @@ void MmRendererVideoWindowControl::attachDisplay(mmr_context_t *context)
return;
}
QWindow *windowForGroup = window;
//According to mmr_output_attach() documentation, the window group name of the
//application's top-level window is expected.
while (windowForGroup->parent())
windowForGroup = windowForGroup->parent();
const char * const groupNameData = static_cast<const char *>(
nativeInterface->nativeResourceForWindow("windowGroup", window));
nativeInterface->nativeResourceForWindow("windowGroup", windowForGroup));
if (!groupNameData) {
qDebug() << "MmRendererVideoWindowControl: Unable to find window group for window" << window;
qDebug() << "MmRendererVideoWindowControl: Unable to find window group for window"
<< windowForGroup;
return;
}