@@ -293,6 +293,10 @@ void MirSurfaceItem::setSurface(MirSurfaceInterface* surface)
293 connect(m_qmlSurface, &MirSurface::screenshotUrlChanged, this, &MirSurfaceItem::updateScreenshot);
293 connect(m_qmlSurface, &MirSurface::screenshotUrlChanged, this, &MirSurfaceItem::updateScreenshot);
294 connect(m_qmlSurface, &MirSurface::liveChanged, this, &MirSurfaceItem::liveChanged);
294 connect(m_qmlSurface, &MirSurface::liveChanged, this, &MirSurfaceItem::liveChanged);
295 connect(m_qmlSurface, &MirSurface::stateChanged, this, &MirSurfaceItem::surfaceStateChanged);
295 connect(m_qmlSurface, &MirSurface::stateChanged, this, &MirSurfaceItem::surfaceStateChanged);
296+ connect(m_qmlSurface, &MirSurface::sizeChanged, this, [this] () {
297+ m_qmlItem->setSize(m_qmlSurface->size());
298+ setImplicitSize(m_qmlSurface->width(), m_qmlSurface->height());
297 QUrl qmlComponentFilePath;
301 QUrl qmlComponentFilePath;
298 if (!m_qmlSurface->qmlFilePath().isEmpty()) {
302 if (!m_qmlSurface->qmlFilePath().isEmpty()) {
@@ -387,6 +391,7 @@ void MirSurfaceItem::updateSurfaceSize()
387 m_qmlItem->setWidth(m_surfaceWidth);
391 m_qmlItem->setWidth(m_surfaceWidth);
388 m_qmlItem->setHeight(m_surfaceHeight);
392 m_qmlItem->setHeight(m_surfaceHeight);
394+ qDebug() << this << "setting implicitsize" << m_surfaceWidth << m_surfaceHeight;
390 setImplicitSize(m_surfaceWidth, m_surfaceHeight);
395 setImplicitSize(m_surfaceWidth, m_surfaceHeight);