diff options
author | Roman Nowicki <rnowicki@sims.pl> | 2015-11-19 11:55:19 +0100 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2015-11-20 09:44:04 +1100 |
commit | 462f38f735c43fd446d881d805e67ca3a44c724c (patch) | |
tree | b0c8ece54cbda955d97bd303b144160f9831ccd1 /ext/qt | |
parent | 2ca86c6b0233c8187eec0e35461b2276eb2ce72d (diff) | |
download | gstreamer-plugins-bad-462f38f735c43fd446d881d805e67ca3a44c724c.tar.gz |
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
Diffstat (limited to 'ext/qt')
-rw-r--r-- | ext/qt/qtitem.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/qt/qtitem.cc b/ext/qt/qtitem.cc index 7c5397913..63060e163 100644 --- a/ext/qt/qtitem.cc +++ b/ext/qt/qtitem.cc @@ -359,7 +359,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; |