https://bugs.winehq.org/show_bug.cgi?id=54810
--- Comment #2 from Sagawa sagawa.aki+winebugs@gmail.com --- I sent MR, https://gitlab.winehq.org/wine/wine/-/merge_requests/2989 .
I found out that the cause of the problem was a glitch in the X11 client call by looking at the trace output of WINEDEBUG=x11drv,wgl and xtrace[1]. [1] https://web.archive.org/web/20140805180608/http://xtrace.alioth.debian.org/
The following are details.
When resizing a D3D child window, the XConfigureWindow that causes this X error (BadWindow) is called from the sync_client_position function.
1503358.331:0024:trace:x11drv:sync_client_position setting client win 54014a2 pos 1,1,730x562 changes=c
In another thread, the reparenting is performed and the original X window is discarded, as indicated by the following message.
1503358.440:0118:trace:x11drv:create_client_window 0x1011e reparent xwin 0/54014a2 1503358.440:0118:trace:wgl:release_gl_drawable destroying 54014a2 drawable 54014a3, gl->type 0x2 004:<:4612: 8: Request(4): DestroyWindow window=0x054014a2
After the window discarding, ConfigureWindow call described before is executed around 1503358.567.
005:<:0d76: 20: Request(12): ConfigureWindow window=0x054014a2 values={width=730 height=562} 005:>:0d76:Error 3=Window: major=12, minor=0, bad=0x054014a2, seq=0d76
Since the window ID 0x054014a2 no longer exists at this point, Wine will display the error message and terminate.