Commit d04a0278 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

qt: run-time check that X11 is used

...before calling XSync().
parent dbc5b8ca
......@@ -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 );
#ifdef Q_WS_X11
XSync( QX11Info::display(), False );
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment