c4b1dba3
by Rémi Bernon at 2025-11-20T09:15:02-06:00
winex11: Initialize thread data when checking _NET_WM_STATE mask.
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.