http://bugs.winehq.org/show_bug.cgi?id=21804
Roderick Colenbrander thunderbird2k@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|opengl |user32
--- Comment #6 from Roderick Colenbrander thunderbird2k@gmail.com 2010-05-13 13:44:32 --- Well this bug is more complicated than it appeared and are more at AJ level. The '3d view' of FPS Creator is a different process.
The '3d view' (actually wined3d does it for it) calls GetDC, SetPixelFormat and wglMakeCurrent. The 'set_win_format' part of SetPixelFormat is carried out in another thread (owned by the main app?). This explains why opengl wasn't initialized in the 'main app' (this is the part the attached patch fixed).
After adding the first patch, the more serious issue becomes clear. The 'set_win_format' function calls SetWindowPos to mark the window dirty. Normally this works fine but in this case there is no dce associated with this window in the 'main process' (because the call to GetDC was made from the other process). This causes the physDev not to be up to date in the wglMakeCurrent call. Marking it as dirty after SetPixelFormat by hand like my other patch did wasn't fully correct.
Quoting AJ from IRC: '<Thunderbird> do you have a suggestion how it should be fixed or where to look? don't know this stuff that well.. <julliard> it would need to have some inter-process dce management, fairly tricky