[vlc-commits] [Git][videolan/vlc][master] 4 commits: qt: show quick window after the user interface is loaded successfully in compositor_wayland

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu May 16 13:04:28 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
0bff17ed by Fatih Uzunoglu at 2024-05-16T12:39:09+00:00
qt: show quick window after the user interface is loaded successfully in compositor_wayland

- - - - -
88ef0727 by Fatih Uzunoglu at 2024-05-16T12:39:09+00:00
qt: show quick window after the user interface is loaded successfully in compositor_win7

- - - - -
3ba29b88 by Fatih Uzunoglu at 2024-05-16T12:39:09+00:00
qt: show quick window after the user interface is loaded successfully in compositor_x11

- - - - -
b6da2c77 by Fatih Uzunoglu at 2024-05-16T12:39:09+00:00
qt: show quick window after the user interface is loaded successfully in compositor_dcomp

- - - - -


4 changed files:

- modules/gui/qt/maininterface/compositor_dcomp.cpp
- modules/gui/qt/maininterface/compositor_wayland.cpp
- modules/gui/qt/maininterface/compositor_win7.cpp
- modules/gui/qt/maininterface/compositor_x11.cpp


Changes:

=====================================
modules/gui/qt/maininterface/compositor_dcomp.cpp
=====================================
@@ -237,11 +237,15 @@ bool CompositorDirectComposition::makeMainInterface(MainCtx* mainCtx)
     connect(quickViewPtr,
             &QQuickWindow::sceneGraphInitialized,
             &eventLoop,
-            [&eventLoop, &appropriateGraphicsApi]() {
+            [&eventLoop, &appropriateGraphicsApi, quickViewPtr]() {
                 if (!(QQuickWindow::graphicsApi() == QSGRendererInterface::Direct3D11 ||
                       QQuickWindow::graphicsApi() == QSGRendererInterface::Direct3D12)) {
                     appropriateGraphicsApi = false;
                 }
+                else
+                {
+                    quickViewPtr->show();
+                }
                 eventLoop.quit();
         }, Qt::SingleShotConnection);
 
@@ -260,8 +264,6 @@ bool CompositorDirectComposition::makeMainInterface(MainCtx* mainCtx)
 
     const bool ret = commonGUICreate(quickViewPtr, quickViewPtr, flags);
 
-    m_quickView->show();
-
     if (!m_quickView->isSceneGraphInitialized())
         eventLoop.exec();
     return (ret && appropriateGraphicsApi);


=====================================
modules/gui/qt/maininterface/compositor_wayland.cpp
=====================================
@@ -109,7 +109,7 @@ bool CompositorWayland::makeMainInterface(MainCtx* mainCtx)
     m_qmlView->setResizeMode(QQuickView::SizeRootObjectToView);
     m_qmlView->setColor(QColor(Qt::transparent));
 
-    m_qmlView->show();
+    m_qmlView->create();
 
     QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
     void* interfaceSurface = nativeInterface->nativeResourceForWindow("surface", m_qmlView.get());
@@ -118,8 +118,13 @@ bool CompositorWayland::makeMainInterface(MainCtx* mainCtx)
 
     m_waylandImpl->setupInterface(m_waylandImpl, interfaceSurface, dprForWindow(m_qmlView.get()));
 
-    return commonGUICreate(m_qmlView.get(), m_qmlView.get(),
-                    CompositorVideo::CAN_SHOW_PIP | CompositorVideo::HAS_ACRYLIC);
+    const bool ret = commonGUICreate(m_qmlView.get(), m_qmlView.get(),
+                                     CompositorVideo::CAN_SHOW_PIP | CompositorVideo::HAS_ACRYLIC);
+
+    if (ret)
+        m_qmlView->show();
+
+    return ret;
 }
 
 QWindow* CompositorWayland::interfaceMainWindow() const


=====================================
modules/gui/qt/maininterface/compositor_win7.cpp
=====================================
@@ -106,11 +106,14 @@ bool CompositorWin7::makeMainInterface(MainCtx* mainCtx)
     connect(m_nativeEventFilter.get(), &Win7NativeEventFilter::windowStyleChanged,
             this, &CompositorWin7::resetVideoZOrder);
 
-    m_qmlView->show();
-
     m_qmlWindowHWND = (HWND)m_qmlView->winId();
 
-    return commonGUICreate(m_qmlView.get(), m_qmlView.get(), CompositorVideo::CAN_SHOW_PIP);
+    const bool ret = commonGUICreate(m_qmlView.get(), m_qmlView.get(), CompositorVideo::CAN_SHOW_PIP);
+
+    if (ret)
+        m_qmlView->show();
+
+    return ret;
 }
 
 void CompositorWin7::destroyMainInterface()


=====================================
modules/gui/qt/maininterface/compositor_x11.cpp
=====================================
@@ -204,15 +204,15 @@ bool CompositorX11::makeMainInterface(MainCtx* mainCtx)
 
     m_qmlView->setFlag(Qt::WindowType::WindowTransparentForInput);
     m_qmlView->setParent(m_renderWindow.get());
-    m_qmlView->winId();
-    m_qmlView->show();
-
+    m_qmlView->create();
     CompositorVideo::Flags flags = CompositorVideo::CAN_SHOW_PIP | HAS_ACRYLIC;
     if (m_renderWindow->supportExtendedFrame())
         flags |= CompositorVideo::HAS_EXTENDED_FRAME;
     if (!commonGUICreate(m_renderWindow.get(), m_qmlView.get(), flags))
         return false;
 
+    m_qmlView->show();
+
     if (m_blurBehind)
         m_renderWindow->m_hasAcrylic = true;
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/dea2eede25647f8a8e340898fb7d1bfb03285a41...b6da2c77cc274aa248a2b7d6489bbdcc7739827b

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/dea2eede25647f8a8e340898fb7d1bfb03285a41...b6da2c77cc274aa248a2b7d6489bbdcc7739827b
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list