void Compositor::onSurfaceMappedChanged() { QWaylandSurface *surface = qobject_cast<QWaylandSurface *>(sender()); CompositorWindow *window = surfaceWindow(surface); if(window && surface) { if(surface->hasContent()) { qDebug() << __PRETTY_FUNCTION__ << " MAPPED " << window << "appId" << window->appId() << "windowType" << window->windowType(); // If it was a window created by QtWebProcess, it may be not already in our WindowModel list if (!WindowModel::isWindowAlreadyAdded(mWindowModels, window)) { qDebug() << Q_FUNC_INFO << "Adding window" << window << "to our models"; emit windowAdded(QVariant::fromValue(static_cast<QQuickItem*>(window))); WindowModel::addWindowForEachModel(mWindowModels, window); } emit windowShown(QVariant::fromValue(static_cast<QQuickItem*>(window))); } else { qDebug() << __PRETTY_FUNCTION__ << " UNMAPPED " << window << "appId" << window->appId() << "windowType" << window->windowType(); if (window == mFullscreenWindow) setFullscreenWindow(0); emit windowHidden(QVariant::fromValue(static_cast<QQuickItem*>(window))); } } }
void LipstickCompositor::surfaceUnmapped(QWaylandSurface *surface) { if (surface == m_fullscreenSurface) setFullscreenSurface(0); LipstickCompositorWindow *window = static_cast<LipstickCompositorWindow *>(surface->surfaceItem()); if (window) emit windowHidden(window); }
void LipstickCompositor::surfaceUnmapped(QWaylandSurface *surface) { if (surface == m_fullscreenSurface) setFullscreenSurface(0); LipstickCompositorWindow *window = static_cast<LipstickCompositorWindow *>(surface->surfaceItem()); if (window) { emit windowHidden(window); // Always schedule an update maybePostUpdateRequest(); } }