From: Rémi Bernon rbernon@codeweavers.com
This is a workaround fixing some regression introduced with b9318e3805f9d000474411cb889719003805fa32, when UpdateLayeredWindow is being called from a non-owner thread which also doesn't have its winex11 thread data initialized.
It would be better to avoid updating windows from any non-owner thread, and most of user32 functions make sure of it by sending messages to the window owner thread when appropriate, but that doesn't work with ULW as the owner thread might not be processing messages, and yet ULW windows are still supposed to be updated and moved around.
The proper fix for that would be to have a dedicated thread managing window surfaces, which might introduced in the future for compositing purposes, but that's a much bigger change and we the workaround should be acceptable in the meantime.
Based on work by Jacob Czekalla. --- dlls/winex11.drv/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index fce1bc7e16e..8a525051109 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1330,7 +1330,7 @@ static void window_set_net_wm_state( struct x11drv_win_data *data, UINT new_stat { UINT i, count, old_state = data->pending_state.net_wm_state;
- new_state &= x11drv_thread_data()->net_wm_state_mask; + new_state &= x11drv_init_thread_data()->net_wm_state_mask; data->desired_state.net_wm_state = new_state; if (!data->whole_window || !data->managed || data->embedded) return; /* no window or not managed, nothing to update */ if (data->wm_state_serial) return; /* another WM_STATE update is pending, wait for it to complete */