Rebase against 64b96eec7d0aea470f897a3ed0ac9e1b3a680cc5.

This commit is contained in:
Zebediah Figura
2022-04-28 23:36:32 -05:00
parent ad3c7cfc9a
commit 50067e77d5
3 changed files with 15 additions and 39 deletions

View File

@@ -1,4 +1,4 @@
From 0c3858177e20be4689445e8f71b705a5792baa93 Mon Sep 17 00:00:00 2001
From bfc1aa75005a50ac1910e727efd7ba385b653c07 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 24 Jan 2017 12:37:46 +0100
Subject: [PATCH] winex11: Fix alpha blending in X11DRV_UpdateLayeredWindow.
@@ -9,10 +9,10 @@ Based on a patch by Dmitry Timoshkov.
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 8b191ca23ed..37c46e6413b 100644
index 3b0ccd8d22a..2ae27dacd2a 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -440,14 +440,11 @@ static void sync_window_region( struct x11drv_win_data *data, HRGN win_region )
@@ -415,14 +415,11 @@ static void sync_window_region( struct x11drv_win_data *data, HRGN win_region )
/***********************************************************************
@@ -30,7 +30,7 @@ index 8b191ca23ed..37c46e6413b 100644
if (opacity == 0xffffffff)
XDeleteProperty( display, win, x11drv_atom(_NET_WM_WINDOW_OPACITY) );
@@ -1620,7 +1617,7 @@ static void create_whole_window( struct x11drv_win_data *data )
@@ -1603,7 +1600,7 @@ static void create_whole_window( struct x11drv_win_data *data )
/* set the window opacity */
if (!NtUserGetLayeredWindowAttributes( data->hwnd, &key, &alpha, &layered_flags )) layered_flags = 0;
@@ -39,7 +39,7 @@ index 8b191ca23ed..37c46e6413b 100644
XFlush( data->display ); /* make sure the window exists before we start painting to it */
@@ -1752,7 +1749,7 @@ void X11DRV_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
@@ -1735,7 +1732,7 @@ void X11DRV_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
{
data->layered = FALSE;
set_window_visual( data, &default_visual, FALSE );
@@ -48,7 +48,7 @@ index 8b191ca23ed..37c46e6413b 100644
if (data->surface) set_surface_color_key( data->surface, CLR_INVALID );
}
done:
@@ -2679,7 +2676,7 @@ void X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWO
@@ -2662,7 +2659,7 @@ void X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWO
set_window_visual( data, &default_visual, FALSE );
if (data->whole_window)
@@ -57,7 +57,7 @@ index 8b191ca23ed..37c46e6413b 100644
if (data->surface)
set_surface_color_key( data->surface, (flags & LWA_COLORKEY) ? key : CLR_INVALID );
@@ -2703,7 +2700,7 @@ void X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWO
@@ -2686,7 +2683,7 @@ void X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWO
Window win = X11DRV_get_whole_window( hwnd );
if (win)
{
@@ -66,7 +66,7 @@ index 8b191ca23ed..37c46e6413b 100644
if (flags & LWA_COLORKEY)
FIXME( "LWA_COLORKEY not supported on foreign process window %p\n", hwnd );
}
@@ -2719,7 +2716,6 @@ BOOL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
@@ -2702,7 +2699,6 @@ BOOL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
{
struct window_surface *surface;
struct x11drv_win_data *data;
@@ -74,7 +74,7 @@ index 8b191ca23ed..37c46e6413b 100644
COLORREF color_key = (info->dwFlags & ULW_COLORKEY) ? info->crKey : CLR_INVALID;
char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )];
BITMAPINFO *bmi = (BITMAPINFO *)buffer;
@@ -2747,6 +2743,10 @@ BOOL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
@@ -2730,6 +2726,10 @@ BOOL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
}
else set_surface_color_key( surface, color_key );
@@ -85,9 +85,9 @@ index 8b191ca23ed..37c46e6413b 100644
if (surface) window_surface_add_ref( surface );
mapped = data->mapped;
release_win_data( data );
@@ -2781,16 +2781,15 @@ BOOL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
@@ -2764,16 +2764,15 @@ BOOL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
{
IntersectRect( &rect, &rect, info->prcDirty );
intersect_rect( &rect, &rect, info->prcDirty );
memcpy( src_bits, dst_bits, bmi->bmiHeader.biSizeImage );
- NtGdiPatBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, BLACKNESS );
}
@@ -105,5 +105,5 @@ index 8b191ca23ed..37c46e6413b 100644
{
memcpy( dst_bits, src_bits, bmi->bmiHeader.biSizeImage );
--
2.35.1
2.34.1