From defcfde17ccf27d8ea9693a79e7a9239cd604b90 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 2 Jan 2013 18:09:34 +0100 Subject: [PATCH] winex11: Add an option to disable shaping of layered window to work around compositor bugs. --- dlls/winex11.drv/bitblt.c | 2 ++ dlls/winex11.drv/x11drv.h | 1 + dlls/winex11.drv/x11drv_main.c | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index 161fa735d03..84e8751fcdf 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1621,6 +1621,8 @@ static void update_surface_region( struct x11drv_window_surface *surface ) int x, y, start, width; HRGN rgn; + if (!shape_layered_windows) return; + if (!surface->is_argb && surface->color_key == CLR_INVALID) { XShapeCombineMask( gdi_display, surface->window, ShapeBounding, 0, 0, None, ShapeSet ); diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 0c462d6ede9..707ee039230 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -218,6 +218,7 @@ extern const int X11DRV_XROPfunction[]; extern int client_side_graphics DECLSPEC_HIDDEN; extern int client_side_with_render DECLSPEC_HIDDEN; +extern int shape_layered_windows DECLSPEC_HIDDEN; extern const struct gdi_dc_funcs *X11DRV_XRender_Init(void) DECLSPEC_HIDDEN; extern struct opengl_funcs *get_glx_driver(UINT) DECLSPEC_HIDDEN; diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index ef6b1a9811c..329fea584b0 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -81,6 +81,7 @@ int private_color_map = 0; int primary_monitor = 0; int client_side_graphics = 1; int client_side_with_render = 1; +int shape_layered_windows = 1; int copy_default_colors = 128; int alloc_system_colors = 256; DWORD thread_data_tls_index = TLS_OUT_OF_INDEXES; @@ -397,6 +398,9 @@ static void setup_options(void) if (!get_config_key( hkey, appkey, "UseXIM", buffer, sizeof(buffer) )) use_xim = IS_OPTION_TRUE( buffer[0] ); + if (!get_config_key( hkey, appkey, "ShapeLayeredWindows", buffer, sizeof(buffer) )) + shape_layered_windows = IS_OPTION_TRUE( buffer[0] ); + if (!get_config_key( hkey, appkey, "PrivateColorMap", buffer, sizeof(buffer) )) private_color_map = IS_OPTION_TRUE( buffer[0] );