[vlc-commits] [Git][videolan/vlc][master] qt: set x11 display string in `CompositorX11::setupVoutWindow()`

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Feb 3 05:47:46 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
892cf452 by Fatih Uzunoglu at 2025-02-03T05:32:20+00:00
qt: set x11 display string in `CompositorX11::setupVoutWindow()`

- - - - -


1 changed file:

- modules/gui/qt/maininterface/compositor_x11.cpp


Changes:

=====================================
modules/gui/qt/maininterface/compositor_x11.cpp
=====================================
@@ -37,6 +37,10 @@
 #include <private/qquickwindow_p.h>
 #endif
 
+#ifndef X_DISPLAY_MISSING
+#include <X11/Xlib.h>
+#endif
+
 using namespace vlc;
 
 int CompositorX11::windowEnable(const vlc_window_cfg_t *)
@@ -251,6 +255,14 @@ bool CompositorX11::setupVoutWindow(vlc_window_t* p_wnd, VoutDestroyCb destroyCb
 
     p_wnd->type = VLC_WINDOW_TYPE_XID;
     p_wnd->handle.xid = m_videoWidget->winId();
+#ifndef X_DISPLAY_MISSING
+    assert(qGuiApp);
+    const auto x11App = qGuiApp->nativeInterface<QNativeInterface::QX11Application>();
+    assert(x11App); // already checked in `init()`
+    assert(x11App->display());
+    p_wnd->display.x11 = XDisplayString(x11App->display());
+#endif
+
     commonSetupVoutWindow(p_wnd, destroyCb);
     return true;
 }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/892cf45208f4b96a7d8628ed9952f6b04396cc14

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/892cf45208f4b96a7d8628ed9952f6b04396cc14
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