mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
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
This commit is contained in:
parent
7093ad482b
commit
27c94f3375
1 changed files with 5 additions and 1 deletions
|
@ -412,7 +412,11 @@ void
|
||||||
QtGLVideoItem::handleWindowChanged(QQuickWindow *win)
|
QtGLVideoItem::handleWindowChanged(QQuickWindow *win)
|
||||||
{
|
{
|
||||||
if (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);
|
connect(win, SIGNAL(sceneGraphInvalidated()), this, SLOT(onSceneGraphInvalidated()), Qt::DirectConnection);
|
||||||
} else {
|
} else {
|
||||||
this->priv->qt_context = NULL;
|
this->priv->qt_context = NULL;
|
||||||
|
|
Loading…
Reference in a new issue