Rémi Bernon (@rbernon) commented about dlls/winex11.drv/init.c:
struct x11drv_client_surface *surface; XVisualInfo visual = default_visual; Colormap colormap; + DWORD xscreen, exstyle;
- if (format && !visual_from_pixel_format( format, &visual )) return NULL; + exstyle = NtUserGetWindowLongW(hwnd, GWL_EXSTYLE); + xscreen = XScreenNumberOfScreen( visual.screen ? NULL : NULL ); + if (use_egl && (exstyle & WS_EX_LAYERED) && find_depth32_visual( gdi_display, xscreen, &visual )) + TRACE( "Using 32-bit depth visual %#lx for window hwnd %p\n", visual.visualid, hwnd ); + else if (format && !visual_from_pixel_format( format, &visual )) return NULL;
There's a `argb_visual` global variable defined, that layered windows usually directly use, it may be what we need to use. It's also possible that this doesn't belong there and that the pixel format, which pretty much drives the visual selection here, should be tweaked to only allow the correct visuals for layered windows. We could have tests to check whether layered windows have a different set of pixel formats for instance. Then even if that's not the case I'm not sure selecting a different visual than what the pixel format describes is going to work either. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11198#note_143661