From: Tim Clem <tclem@codeweavers.com> set_app_icon does quite a bit of work, and macdrv_SetDesktopWindow may be called from multiple threads. We only need to do it once. --- dlls/winemac.drv/window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 9420e17f810..5236cda0baa 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -1172,6 +1172,7 @@ struct macdrv_client_surface *macdrv_client_surface_create(HWND hwnd) */ void macdrv_SetDesktopWindow(HWND hwnd) { + static pthread_once_t app_icon_once = PTHREAD_ONCE_INIT; unsigned int width, height; TRACE("%p\n", hwnd); @@ -1206,7 +1207,7 @@ void macdrv_SetDesktopWindow(HWND hwnd) SERVER_END_REQ; } - set_app_icon(); + pthread_once(&app_icon_once, set_app_icon); } #define WM_WINE_NOTIFY_ACTIVITY WM_USER -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10032