On Wed Apr 24 08:50:19 2024 +0000, Rémi Bernon wrote:
The issue is that winex11 closes its thread display in `ThreadDetach`. This destroys every top-level window that's been created with it, as well as any of the client windows that are still parented to them.
Maybe we should just move `ThreadDetach` call in win32u after `destroy_thread_windows()`?
Having a separated loop like this is not exactly safe: there is a time window when a window handle is still valid, so it may be used to attach a new surface after we detach them here. I know that it's a preexisting problem, but we shouldn't be hard to do better in win32u.