You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against ae9266992a54db660da08f881798c69c55033d9f.
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
From 5fe1a81fa6564f2d201bd3e225ac3bc4f41a2d2e Mon Sep 17 00:00:00 2001
|
||||
From 4dab3f34431e3bcb91a17128fd7f3dca7c49f764 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.
|
||||
|
||||
Based on a patch by Dmitry Timoshkov.
|
||||
---
|
||||
dlls/winex11.drv/window.c | 31 +++++++++++++++----------------
|
||||
1 file changed, 15 insertions(+), 16 deletions(-)
|
||||
dlls/winex11.drv/window.c | 27 +++++++++++++--------------
|
||||
1 file changed, 13 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
|
||||
index 4dfb1bb6f76..8fb1a4a2786 100644
|
||||
index b3202847bb7..4f00371d178 100644
|
||||
--- a/dlls/winex11.drv/window.c
|
||||
+++ b/dlls/winex11.drv/window.c
|
||||
@@ -434,14 +434,11 @@ static void sync_window_region( struct x11drv_win_data *data, HRGN win_region )
|
||||
@@ -436,14 +436,11 @@ static void sync_window_region( struct x11drv_win_data *data, HRGN win_region )
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
@@ -30,7 +30,7 @@ index 4dfb1bb6f76..8fb1a4a2786 100644
|
||||
|
||||
if (opacity == 0xffffffff)
|
||||
XDeleteProperty( display, win, x11drv_atom(_NET_WM_WINDOW_OPACITY) );
|
||||
@@ -1608,7 +1605,7 @@ static void create_whole_window( struct x11drv_win_data *data )
|
||||
@@ -1615,7 +1612,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,7 +39,7 @@ index 4dfb1bb6f76..8fb1a4a2786 100644
|
||||
|
||||
XFlush( data->display ); /* make sure the window exists before we start painting to it */
|
||||
|
||||
@@ -1740,7 +1737,7 @@ void CDECL X11DRV_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
|
||||
@@ -1747,7 +1744,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 4dfb1bb6f76..8fb1a4a2786 100644
|
||||
if (data->surface) set_surface_color_key( data->surface, CLR_INVALID );
|
||||
}
|
||||
done:
|
||||
@@ -2668,7 +2665,7 @@ void CDECL X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alph
|
||||
@@ -2674,7 +2671,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 4dfb1bb6f76..8fb1a4a2786 100644
|
||||
if (data->surface)
|
||||
set_surface_color_key( data->surface, (flags & LWA_COLORKEY) ? key : CLR_INVALID );
|
||||
|
||||
@@ -2692,7 +2689,7 @@ void CDECL X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alph
|
||||
@@ -2698,7 +2695,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 4dfb1bb6f76..8fb1a4a2786 100644
|
||||
if (flags & LWA_COLORKEY)
|
||||
FIXME( "LWA_COLORKEY not supported on foreign process window %p\n", hwnd );
|
||||
}
|
||||
@@ -2708,7 +2705,6 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO
|
||||
@@ -2714,7 +2711,6 @@ BOOL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
|
||||
{
|
||||
struct window_surface *surface;
|
||||
struct x11drv_win_data *data;
|
||||
@@ -74,7 +74,7 @@ index 4dfb1bb6f76..8fb1a4a2786 100644
|
||||
COLORREF color_key = (info->dwFlags & ULW_COLORKEY) ? info->crKey : CLR_INVALID;
|
||||
char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )];
|
||||
BITMAPINFO *bmi = (BITMAPINFO *)buffer;
|
||||
@@ -2736,6 +2732,10 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO
|
||||
@@ -2742,6 +2738,10 @@ BOOL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
|
||||
}
|
||||
else set_surface_color_key( surface, color_key );
|
||||
|
||||
@@ -85,24 +85,22 @@ index 4dfb1bb6f76..8fb1a4a2786 100644
|
||||
if (surface) window_surface_add_ref( surface );
|
||||
mapped = data->mapped;
|
||||
release_win_data( data );
|
||||
@@ -2769,16 +2769,15 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO
|
||||
@@ -2776,16 +2776,15 @@ BOOL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
|
||||
{
|
||||
IntersectRect( &rect, &rect, info->prcDirty );
|
||||
memcpy( src_bits, dst_bits, bmi->bmiHeader.biSizeImage );
|
||||
- PatBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, BLACKNESS );
|
||||
- NtGdiPatBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, BLACKNESS );
|
||||
}
|
||||
src_rect = rect;
|
||||
if (info->pptSrc) OffsetRect( &src_rect, info->pptSrc->x, info->pptSrc->y );
|
||||
DPtoLP( info->hdcSrc, (POINT *)&src_rect, 2 );
|
||||
NtGdiTransformPoints( info->hdcSrc, (POINT *)&src_rect, (POINT *)&src_rect, 2, NtGdiDPtoLP );
|
||||
|
||||
- ret = GdiAlphaBlend( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
|
||||
- info->hdcSrc, src_rect.left, src_rect.top,
|
||||
- src_rect.right - src_rect.left, src_rect.bottom - src_rect.top,
|
||||
- (info->dwFlags & ULW_ALPHA) ? *info->pblend : blend );
|
||||
+ ret = StretchBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
|
||||
+ info->hdcSrc, src_rect.left, src_rect.top,
|
||||
+ src_rect.right - src_rect.left, src_rect.bottom - src_rect.top,
|
||||
+ SRCCOPY );
|
||||
- ret = NtGdiAlphaBlend( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
|
||||
+ ret = NtGdiStretchBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
|
||||
info->hdcSrc, src_rect.left, src_rect.top,
|
||||
src_rect.right - src_rect.left, src_rect.bottom - src_rect.top,
|
||||
- (info->dwFlags & ULW_ALPHA) ? *info->pblend : blend, 0 );
|
||||
+ SRCCOPY, 0 );
|
||||
if (ret)
|
||||
{
|
||||
memcpy( dst_bits, src_bits, bmi->bmiHeader.biSizeImage );
|
||||
|
Reference in New Issue
Block a user