On 07/22/2016 03:11 AM, Alexandre Julliard wrote:
Miklós Máté <mtmkls@gmail.com> writes:

Hmm, you are right. Mesa does set an XCloseDisplay callback to clean
things up for the display connections it encounters. If I use
data->display instead of gdi_display for pglXCreateWindow in line 1358
of opengl.c, the tests pass, and no zombie glx windows remain. I don't
know if I should dare to take responsibility for this change, though,
as I know almost nothing about GDI.
If it works then it's the right thing to do.
I did some further testing, and it doesn't work. Mesa glx maintains its state per-display, and creating a drawable with one display connection but makecurrent with an other one can lead to bad things. Unfortunately, wine-csmt likes to do those from separate threads, so the thread-specific display connections cannot be used instead of the global gdi_display.

MM