Commit 0656ac9c authored by Erwan Tulou's avatar Erwan Tulou

skins2(Linux): A XSync is needed

This partially fixes the position indicator getting blurry, because XGetImage didn't
retrieve the latest change in pixmap (Previous XCopyArea calls may still be pending)

Note that XSync is needed but not sufficient. Sporadic blurriness can still happen, because
there seems to be no way to know for sure when the pixmap content is really updated.
(waiting for NoExpose event, if enabled, is also not enough). Also, this problem is more
prone to occur with --vout xv than with x11 or opengl, as if xvideo were stressing the X server
more than the other two.

 modules/gui/skins2/x11/x11_graphics.cpp |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
parent e759ce5f
...@@ -188,6 +188,10 @@ void X11Graphics::drawBitmap( const GenericBitmap &rBitmap, int xSrc, ...@@ -188,6 +188,10 @@ void X11Graphics::drawBitmap( const GenericBitmap &rBitmap, int xSrc,
return; return;
} }
// Force pending XCopyArea to be sent to the X Server
// before issuing an XGetImage.
XSync( XDISPLAY, False );
// Get the image from the pixmap // Get the image from the pixmap
XImage *pImage = XGetImage( XDISPLAY, m_pixmap, xDest, yDest, width, XImage *pImage = XGetImage( XDISPLAY, m_pixmap, xDest, yDest, width,
height, AllPlanes, ZPixmap ); height, AllPlanes, ZPixmap );
......
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