Use Registry::interfacesAnnounced signal for WaylandBackend::createSurface

We are interested in going into createSurface exactly once when
everything is ready. This is something we now know due to the new signal
in Registry. So instead of multiple entry points there is just one.
This commit is contained in:
Martin Gräßlin 2014-10-15 12:37:20 +02:00
parent b23a19e93b
commit 752de2d888

View file

@ -358,7 +358,6 @@ WaylandBackend::WaylandBackend(QObject *parent)
connect(m_registry, &Registry::shellAnnounced, this, connect(m_registry, &Registry::shellAnnounced, this,
[this](quint32 name) { [this](quint32 name) {
m_shell->setup(m_registry->bindShell(name, 1)); m_shell->setup(m_registry->bindShell(name, 1));
createSurface();
} }
); );
connect(m_registry, &Registry::outputAnnounced, this, connect(m_registry, &Registry::outputAnnounced, this,
@ -382,9 +381,9 @@ WaylandBackend::WaylandBackend(QObject *parent)
connect(m_registry, &Registry::fullscreenShellAnnounced, this, connect(m_registry, &Registry::fullscreenShellAnnounced, this,
[this](quint32 name, quint32 version) { [this](quint32 name, quint32 version) {
m_fullscreenShell->setup(m_registry->bindFullscreenShell(name, version)); m_fullscreenShell->setup(m_registry->bindFullscreenShell(name, version));
createSurface();
} }
); );
connect(m_registry, &Registry::interfacesAnnounced, this, &WaylandBackend::createSurface);
initConnection(); initConnection();
} }