http://bugs.winehq.org/show_bug.cgi?id=21804
--- Comment #4 from Roderick Colenbrander thunderbird2k@gmail.com 2010-04-27 08:54:31 --- The issue is that SetPixelFormat under the hood issues the creation of a opengl child window which seems to happen in a different thread. The thread which called SetPixelFormat then continues creating a WGL context and making that context current. The physdev hasn't been updated with the opengl child window and because of this makes the wrong window current. At a later stage when SwapBuffers is called, the physdev contains the right gl_drawable but the 'bad' drawable is current resulting in GLXBadDrawable. Somehow a physdev update needs to be forced and I think this can be done by passing the right flags to GetDCEx.