winex11: Also catch X errors from XF86VidModeSetGammaRamp().

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-10-29 10:49:20 +01:00
parent 5b62f89baa
commit 81f8b6e8c2
1 changed files with 4 additions and 0 deletions

View File

@ -416,8 +416,12 @@ static BOOL xf86vm_set_gamma_ramp(struct x11drv_gamma_ramp *ramp)
ramp->red, ramp->green, ramp->blue, GAMMA_RAMP_SIZE);
}
X11DRV_expect_error(gdi_display, XVidModeErrorHandler, NULL);
ret = pXF86VidModeSetGammaRamp(gdi_display, DefaultScreen(gdi_display),
xf86vm_gammaramp_size, red, green, blue);
if (ret) XSync( gdi_display, FALSE );
if (X11DRV_check_error()) ret = FALSE;
if (red != ramp->red)
heap_free(red);
return ret;