From 6dbb153ede48e77a87dddf37e5276276a701c5c3 Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Fri, 25 Oct 2019 21:39:54 +0800 Subject: [PATCH] winex11.drv: Call XFlush() right after XUngrabServer(). XGrabServer() stops the processing of other display connections until a XUngrabServer() call is actually processed by the X server. Signed-off-by: Zhiyi Zhang Signed-off-by: Alexandre Julliard --- dlls/winex11.drv/palette.c | 1 + dlls/winex11.drv/xrandr.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/dlls/winex11.drv/palette.c b/dlls/winex11.drv/palette.c index bba2253264b..073761a5ee9 100644 --- a/dlls/winex11.drv/palette.c +++ b/dlls/winex11.drv/palette.c @@ -480,6 +480,7 @@ static BOOL X11DRV_PALETTE_BuildSharedMap( const PALETTEENTRY *sys_pal_template palette_size = c_min + NB_RESERVED_COLORS; XUngrabServer(gdi_display); + XFlush(gdi_display); TRACE("adjusted size %i colorcells\n", palette_size); } diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c index 6bb2b18ce7f..85da5efea3a 100644 --- a/dlls/winex11.drv/xrandr.c +++ b/dlls/winex11.drv/xrandr.c @@ -419,6 +419,7 @@ static LONG xrandr12_set_current_mode( int mode ) if (status != RRSetConfigSuccess) { XUngrabServer( gdi_display ); + XFlush( gdi_display ); ERR("Failed to disable CRTC.\n"); pXRRFreeCrtcInfo( crtc_info ); pXRRFreeScreenResources( resources ); @@ -440,6 +441,7 @@ static LONG xrandr12_set_current_mode( int mode ) crtc_info->rotation, crtc_info->outputs, crtc_info->noutput ); XUngrabServer( gdi_display ); + XFlush( gdi_display ); pXRRFreeCrtcInfo( crtc_info ); pXRRFreeScreenResources( resources );