a1cf6a68
by Rémi Bernon at 2025-11-20T12:37:25-06:00
win32u: Release internal OpenGL drawables outside of the user lock.
Sometimes windows get destroyed while wined3d still has some internal
drawables allocated, and the cached DCs gets removed and destroyed as
soon as the window itself is, causing free_dce to be called with the
user lock held already.
Then opengl_drawable_release grabing the surfaces lock with the user
lock held causes deadlocks with other threads creating or presenting
surfaces which need to take the locks in the reverse order.
Fixes: a085746bbe3594e4ea01ea578823383e6447b6b6