From: Gabriel Ivăncescu gabrielopcode@gmail.com
8a71a4a30495635bdc905af41869d8ed9e43009f caused us to set a different visual but with the correct alpha prior to actually setting it to the systray's visual. In this case, the alpha would match and not set it to the systray's visual. This caused the Ubuntu 23.10.1 default WM to crash.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/winex11.drv/window.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index afa13f01277..5a014c9080d 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1798,15 +1798,16 @@ static void destroy_whole_window( struct x11drv_win_data *data, BOOL already_des */ void set_window_visual( struct x11drv_win_data *data, const XVisualInfo *vis, BOOL use_alpha ) { + BOOL same_visual = (data->vis.visualid == vis->visualid); Window client_window = data->client_window; Window whole_window = data->whole_window;
- if (!data->use_alpha == !use_alpha) return; + if (!data->use_alpha == !use_alpha && same_visual) return; if (data->surface) window_surface_release( data->surface ); data->surface = NULL; data->use_alpha = use_alpha;
- if (data->vis.visualid == vis->visualid) return; + if (same_visual) return; data->client_window = 0; destroy_whole_window( data, client_window != 0 /* don't destroy whole_window until reparented */ ); data->vis = *vis;