Commit 21ca4ac9 authored by Roman Nowicki's avatar Roman Nowicki Committed by Matthew Waters

qml: proper initialization if scene is already initialized

The scene graph can be initialized when the we receive window handle change
notification and so we will not receive a scenegraph initialization
notification.  Initialize ourself in this case.

https://bugzilla.gnome.org/show_bug.cgi?id=758337
parent b2718cbd
......@@ -412,7 +412,11 @@ void
QtGLVideoItem::handleWindowChanged(QQuickWindow *win)
{
if (win) {
connect(win, SIGNAL(sceneGraphInitialized()), this, SLOT(onSceneGraphInitialized()), Qt::DirectConnection);
if (win->isSceneGraphInitialized())
onSceneGraphInitialized();
else
connect(win, SIGNAL(sceneGraphInitialized()), this, SLOT(onSceneGraphInitialized()), Qt::DirectConnection);
connect(win, SIGNAL(sceneGraphInvalidated()), this, SLOT(onSceneGraphInvalidated()), Qt::DirectConnection);
} else {
this->priv->qt_context = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment