diff --git a/patches/winex11-UpdateLayeredWindow/0001-winex11-Fix-alpha-blending-in-X11DRV_UpdateLayeredWi.patch b/patches/winex11-UpdateLayeredWindow/0001-winex11-Fix-alpha-blending-in-X11DRV_UpdateLayeredWi.patch index aa511c79..e9f39c34 100644 --- a/patches/winex11-UpdateLayeredWindow/0001-winex11-Fix-alpha-blending-in-X11DRV_UpdateLayeredWi.patch +++ b/patches/winex11-UpdateLayeredWindow/0001-winex11-Fix-alpha-blending-in-X11DRV_UpdateLayeredWi.patch @@ -1,7 +1,7 @@ -From ae27ea7329561c939058579f45154e7905042478 Mon Sep 17 00:00:00 2001 +From 4321aa370da9a3df82831cf0bcc697ce9f6af868 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Tue, 24 Jan 2017 12:37:46 +0100 -Subject: winex11: Fix alpha blending in X11DRV_UpdateLayeredWindow. +Subject: [PATCH] winex11: Fix alpha blending in X11DRV_UpdateLayeredWindow. Based on a patch by Dmitry Timoshkov. --- @@ -9,10 +9,10 @@ Based on a patch by Dmitry Timoshkov. 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c -index eaf6dcfa3ed..5dec74acae7 100644 +index 6d79f06..81cb2b3 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c -@@ -410,14 +410,11 @@ static void sync_window_region( struct x11drv_win_data *data, HRGN win_region ) +@@ -430,14 +430,11 @@ static void sync_window_region( struct x11drv_win_data *data, HRGN win_region ) /*********************************************************************** @@ -30,7 +30,7 @@ index eaf6dcfa3ed..5dec74acae7 100644 if (opacity == 0xffffffff) XDeleteProperty( display, win, x11drv_atom(_NET_WM_WINDOW_OPACITY) ); -@@ -1527,7 +1524,7 @@ static void create_whole_window( struct x11drv_win_data *data ) +@@ -1559,7 +1556,7 @@ static void create_whole_window( struct x11drv_win_data *data ) /* set the window opacity */ if (!GetLayeredWindowAttributes( data->hwnd, &key, &alpha, &layered_flags )) layered_flags = 0; @@ -39,17 +39,17 @@ index eaf6dcfa3ed..5dec74acae7 100644 XFlush( data->display ); /* make sure the window exists before we start painting to it */ -@@ -1647,7 +1644,7 @@ void CDECL X11DRV_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style ) +@@ -1691,7 +1688,7 @@ void CDECL X11DRV_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style ) { data->layered = FALSE; - set_window_visual( data, &default_visual ); + set_window_visual( data, &default_visual, FALSE ); - sync_window_opacity( data->display, data->whole_window, 0, 0, 0 ); + set_window_opacity( data->display, data->whole_window, 0xff ); if (data->surface) set_surface_color_key( data->surface, CLR_INVALID ); } done: -@@ -2538,7 +2535,7 @@ void CDECL X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alph - set_window_visual( data, &default_visual ); +@@ -2570,7 +2567,7 @@ void CDECL X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alph + set_window_visual( data, &default_visual, FALSE ); if (data->whole_window) - sync_window_opacity( data->display, data->whole_window, key, alpha, flags ); @@ -57,7 +57,7 @@ index eaf6dcfa3ed..5dec74acae7 100644 if (data->surface) set_surface_color_key( data->surface, (flags & LWA_COLORKEY) ? key : CLR_INVALID ); -@@ -2562,7 +2559,7 @@ void CDECL X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alph +@@ -2594,7 +2591,7 @@ void CDECL X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alph Window win = X11DRV_get_whole_window( hwnd ); if (win) { @@ -66,7 +66,7 @@ index eaf6dcfa3ed..5dec74acae7 100644 if (flags & LWA_COLORKEY) FIXME( "LWA_COLORKEY not supported on foreign process window %p\n", hwnd ); } -@@ -2578,7 +2575,6 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO +@@ -2610,7 +2607,6 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO { struct window_surface *surface; struct x11drv_win_data *data; @@ -74,7 +74,7 @@ index eaf6dcfa3ed..5dec74acae7 100644 COLORREF color_key = (info->dwFlags & ULW_COLORKEY) ? info->crKey : CLR_INVALID; char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )]; BITMAPINFO *bmi = (BITMAPINFO *)buffer; -@@ -2606,6 +2602,10 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO +@@ -2638,6 +2634,10 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO } else set_surface_color_key( surface, color_key ); @@ -85,7 +85,7 @@ index eaf6dcfa3ed..5dec74acae7 100644 if (surface) window_surface_add_ref( surface ); release_win_data( data ); -@@ -2629,16 +2629,15 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO +@@ -2661,16 +2661,15 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO { IntersectRect( &rect, &rect, info->prcDirty ); memcpy( src_bits, dst_bits, bmi->bmiHeader.biSizeImage ); @@ -107,5 +107,5 @@ index eaf6dcfa3ed..5dec74acae7 100644 { memcpy( dst_bits, src_bits, bmi->bmiHeader.biSizeImage ); -- -2.13.1 +2.7.4