http://bugs.winehq.org/show_bug.cgi?id=29236
--- Comment #14 from rocko rockorequin@hotmail.com 2011-12-19 04:51:07 CST --- With +win,+x11drv I can see it create three windows but only destroy two, and the third window is the one that causes the problem:
trace:x11drv:X11DRV_ExtEscape SET_DRAWABLE hdc 0x79c drawable 0 gl_drawable 0 pf 0 dc_rect (0,0)-(1594,875) drawable_rect (3,22)-(1597,897) trace:win:GetDCEx (0x40036,(nil),0x10010): returning 0x79c trace:win:GetWindowRect hwnd 0x40036 (0,0)-(1600,900) VGL: XCreateWindow created window 0x4c0000e on display 0x7dcb3b48 VGL: XCreateWindow created window 0x4c0000f on display 0x7dcb3b48 VGL: XCreateWindow created window 0x4c00010 on display 0x7dcb3b48 trace:x11drv:create_icon_window created 4c00010 ... trace:x11drv:destroy_whole_window win 0x40036 xwin 4c0000e/4c0000f VGL: XDestroyWindow called on 0x4c0000e for display 0x7dcb3b48 VGL: XDestroyWindow called on 0x4c00010 for display 0x7dcb3b48 X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
I can't see anywhere in the log where wine reports that it created 0x4c0000f, by the way, so is that one that VGL specially created?
dlls/winex11.drv/window.c#destroy_whole_window only explicitly destroys the 'whole_window', not the 'client_window':
... TRACE( "win %p xwin %lx/%lx %d)\n", data->hwnd, data->whole_window, data->client_window ); wine_tsx11_lock(); XDeleteContext( display, data->whole_window, winContext ); XDeleteContext( display, data->client_window, winContext ); if (!already_destroyed) XDestroyWindow( display, data->whole_window ); data->whole_window = data->client_window = 0; ...
Are the windows data->whole_window and data->client_window linked and does X11 know this and invalidate the third window (0x4c0000f in this case) itself? Did wine create 0x4c0000e and 0x4c0000f or did VGL create them? If wine created them, should wine explicitly destroy data->client_window as well?