diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index be5537127a2..fc7972c62fe 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -259,6 +259,7 @@ static INT X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d RECT rect = physDev->dc_rect; OffsetRect( &rect, -physDev->dc_rect.left, -physDev->dc_rect.top ); + if (data->flush) XFlush( gdi_display ); XSetFunction( gdi_display, physDev->gc, GXcopy ); XCopyArea( gdi_display, data->gl_drawable, physDev->drawable, physDev->gc, 0, 0, rect.right, rect.bottom, diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 01b92e3a099..7aa6448fedb 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1976,6 +1976,7 @@ static void wglFinish(void) escape.code = X11DRV_FLUSH_GL_DRAWABLE; escape.gl_drawable = 0; + escape.flush = FALSE; if ((gl = get_gl_drawable( WindowFromDC( ctx->hdc ), 0 ))) { @@ -2001,6 +2002,7 @@ static void wglFlush(void) escape.code = X11DRV_FLUSH_GL_DRAWABLE; escape.gl_drawable = 0; + escape.flush = FALSE; if ((gl = get_gl_drawable( WindowFromDC( ctx->hdc ), 0 ))) { @@ -3286,6 +3288,7 @@ static BOOL glxdrv_wglSwapBuffers( HDC hdc ) escape.code = X11DRV_FLUSH_GL_DRAWABLE; escape.gl_drawable = 0; + escape.flush = !pglXWaitForSbcOML; if (!(gl = get_gl_drawable( WindowFromDC( hdc ), hdc ))) { diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index abd069e1b42..6781d6073a7 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -304,6 +304,7 @@ struct x11drv_escape_flush_gl_drawable { enum x11drv_escape_codes code; /* escape code (X11DRV_FLUSH_GL_DRAWABLE) */ Drawable gl_drawable; /* GL drawable */ + BOOL flush; /* flush X11 before copying */ }; /**************************************************************************