#ifdef Q_WS_X11
# include <X11/Xlib.h>
# include <qx11info_x11.h>
+static void videoSync( void )
+{
+ /* 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. */
+ XSync( QX11Info::display(), False );
+}
+#else
+# define videoSync() (void)0
#endif
#include <math.h>
reparentable->setLayout( innerLayout );
layout->addWidget( reparentable );
- updateGeometry();
+ videoSync();
#ifndef NDEBUG
msg_Dbg( p_intf, "embedded video ready (handle %p)",
(void *)stable->winId() );
videoSize.rheight() = h;
if( !isVisible() ) show();
updateGeometry(); // Needed for deinterlace
+ videoSync();
}
void VideoWidget::SetFullScreen( bool b_fs )
layout->addWidget( reparentable );
reparentable->setWindowState( newstate );
}
+ videoSync();
}
void VideoWidget::release( void )