Module: wine Branch: master Commit: 61ac1aaa808bd107ab9af94d8d17dfc083d91564 URL: https://gitlab.winehq.org/wine/wine/-/commit/61ac1aaa808bd107ab9af94d8d17dfc...
Author: Rémi Bernon rbernon@codeweavers.com Date: Sat Jun 15 21:09:37 2024 +0200
winemac: Rely on win32u layered window surface attribute updates.
---
dlls/winemac.drv/macdrv.h | 1 - dlls/winemac.drv/surface.c | 10 +++------- dlls/winemac.drv/window.c | 2 -- 3 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index 8b9e908bc1a..cbb453b2dfa 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -208,7 +208,6 @@ extern void init_win_context(void); extern macdrv_window macdrv_get_cocoa_window(HWND hwnd, BOOL require_on_screen); extern RGNDATA *get_region_data(HRGN hrgn, HDC hdc_lptodp); extern void activate_on_following_focus(void); -extern void set_surface_use_alpha(struct window_surface *window_surface, BOOL use_alpha);
extern void macdrv_handle_event(const macdrv_event *event);
diff --git a/dlls/winemac.drv/surface.c b/dlls/winemac.drv/surface.c index fa34a5122ab..b6f0ea2d812 100644 --- a/dlls/winemac.drv/surface.c +++ b/dlls/winemac.drv/surface.c @@ -127,7 +127,7 @@ static struct macdrv_window_surface *get_mac_surface(struct window_surface *surf * create_surface */ static struct window_surface *create_surface(HWND hwnd, macdrv_window window, const RECT *rect, - struct window_surface *old_surface, BOOL use_alpha) + struct window_surface *old_surface) { struct macdrv_window_surface *surface = NULL; int width = rect->right - rect->left, height = rect->bottom - rect->top; @@ -178,9 +178,6 @@ static struct window_surface *create_surface(HWND hwnd, macdrv_window window, co
TRACE("created %p for %p %s\n", surface, window, wine_dbgstr_rect(rect));
- if (use_alpha) window_surface_set_layered( &surface->header, CLR_INVALID, -1, 0xff000000 ); - else window_surface_set_layered( &surface->header, CLR_INVALID, -1, 0 ); - return &surface->header;
failed: @@ -216,7 +213,7 @@ BOOL macdrv_CreateWindowSurface(HWND hwnd, const RECT *surface_rect, struct wind } }
- *surface = create_surface(data->hwnd, data->cocoa_window, surface_rect, data->surface, FALSE); + *surface = create_surface(data->hwnd, data->cocoa_window, surface_rect, data->surface);
done: release_win_data(data); @@ -241,7 +238,7 @@ BOOL macdrv_CreateLayeredWindow(HWND hwnd, const RECT *surface_rect, COLORREF co surface = data->surface; if (!surface || !EqualRect(&surface->rect, surface_rect)) { - data->surface = create_surface(data->hwnd, data->cocoa_window, surface_rect, NULL, TRUE); + data->surface = create_surface(data->hwnd, data->cocoa_window, surface_rect, NULL); if (surface) window_surface_release(surface); surface = data->surface; if (data->unminimized_surface) @@ -250,7 +247,6 @@ BOOL macdrv_CreateLayeredWindow(HWND hwnd, const RECT *surface_rect, COLORREF co data->unminimized_surface = NULL; } } - else window_surface_set_layered(surface, color_key, -1, 0xff000000);
if ((*window_surface = surface)) window_surface_add_ref(surface);
diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 0784b0e4e39..6ebaccadbb2 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -1683,7 +1683,6 @@ void macdrv_SetLayeredWindowAttributes(HWND hwnd, COLORREF key, BYTE alpha, DWOR { data->layered = TRUE; data->ulw_layered = FALSE; - if (data->surface) window_surface_set_layered(data->surface, key, alpha << 24, 0); if (data->cocoa_window) { sync_window_opacity(data, key, alpha, FALSE, flags); @@ -1782,7 +1781,6 @@ void macdrv_SetWindowStyle(HWND hwnd, INT offset, STYLESTRUCT *style) data->layered = FALSE; data->ulw_layered = FALSE; sync_window_opacity(data, 0, 0, FALSE, 0); - if (data->surface) window_surface_set_layered(data->surface, CLR_INVALID, -1, 0); }
if (offset == GWL_EXSTYLE && (changed & WS_EX_LAYOUTRTL))