[vlc-commits] [Git][videolan/vlc][master] qml: fix assertion failure when opening detached playlist window on Windows

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Sep 19 05:12:59 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
5a7fd5b4 by Fatih Uzunoglu at 2026-09-19T02:52:20+00:00
qml: fix assertion failure when opening detached playlist window on Windows

The bindings are evaluated before `Component.onCompleted` is executed, since
we have `visible: MainCtx.playqueuePanel.visible`, the window would create
the platform window before `MainCtx.createWindowWithoutRedirectionSurface()`
is called, which is forbidden because it needs to be called before the platform
window is created (before `CreateWindowExW()` is called by the platform window).

I have checked if `transientParent` would cause the same, but it is not the
case. Nevertheless, I confirmed that the change here is enough on Windows 8.1.

Delaying the visible binding up to component completion is intentionally
platform agnostic, since it provides benefit of resolving properties that
are meant to be set before showing the window (such as `width`), at the
expense of negligible delay in being visible.

Regression since 84486e2f.

- - - - -


1 changed file:

- modules/gui/qt/playlist/qml/PlaylistDetachedWindow.qml


Changes:

=====================================
modules/gui/qt/playlist/qml/PlaylistDetachedWindow.qml
=====================================
@@ -25,7 +25,7 @@ import VLC.Style
 
 
 Window {
-    visible: MainCtx.playqueuePanel.visible
+    visible: _componentCompleted && MainCtx.playqueuePanel.visible
 
     transientParent: MainCtx.intfMainWindow
 
@@ -37,6 +37,8 @@ Window {
     title: qsTr("Play Queue")
     color: theme.bg.primary
 
+    property bool _componentCompleted: false
+
     onVisibleChanged: {
         if (visible) {
             console.assert(transientParent)
@@ -57,6 +59,8 @@ Window {
             if (!ret)
                 console.debug("MainCtx::createWindowWithoutRedirectionSurface(): returned false for window", this)
         }
+
+        _componentCompleted = true
     }
 
     PlaylistPane {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5a7fd5b4fd8c0343963f09c517ba7c2549c0c802

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5a7fd5b4fd8c0343963f09c517ba7c2549c0c802
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list