vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Tue Nov 29 
21:54:37 2016 +0200| [d04a027873879c36e2d3fb84ea9cc6c35d698573] | committer: 
Rémi Denis-Courmont

qt: run-time check that X11 is used

...before calling XSync().

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d04a027873879c36e2d3fb84ea9cc6c35d698573
---

 modules/gui/qt/components/interface_widgets.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/components/interface_widgets.cpp 
b/modules/gui/qt/components/interface_widgets.cpp
index be37070..688c293 100644
--- a/modules/gui/qt/components/interface_widgets.cpp
+++ b/modules/gui/qt/components/interface_widgets.cpp
@@ -88,10 +88,14 @@ VideoWidget::~VideoWidget()
 
 void VideoWidget::sync( void )
 {
-#if defined (QT5_HAS_X11) || defined (Q_WS_X11)
     /* Make sure the X server has processed all requests.
      * This protects other threads using distinct connections from getting
      * the video widget window in an inconsistent states. */
+#ifdef QT5_HAS_X11
+    if( QX11Info::isPlatformX11() )
+        XSync( QX11Info::display(), False );
+#endif
+#ifdef Q_WS_X11
     XSync( QX11Info::display(), False );
 #endif
 }

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to