Alexandre Julliard : winex11: Also catch X errors from XF86VidModeSetGammaRamp().

Alexandre Julliard julliard at winehq.org
Tue Oct 29 17:41:46 CDT 2019


Module: wine
Branch: master
Commit: 81f8b6e8c215dc04a19438e4369fcba8f7f4f333
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=81f8b6e8c215dc04a19438e4369fcba8f7f4f333

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Oct 29 10:49:20 2019 +0100

winex11: Also catch X errors from XF86VidModeSetGammaRamp().

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winex11.drv/xvidmode.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/winex11.drv/xvidmode.c b/dlls/winex11.drv/xvidmode.c
index 9c0c97f1eb..975575fe77 100644
--- a/dlls/winex11.drv/xvidmode.c
+++ b/dlls/winex11.drv/xvidmode.c
@@ -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;




More information about the wine-cvs mailing list